Periodically Build #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Periodically Build | |
on: | |
schedule: | |
- cron: '0 0 1 * *' # At 00:00 on the first day of every month | |
workflow_dispatch: | |
jobs: | |
setup-build: | |
name: Setup, Build | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
max-parallel: 6 | |
# select a core set of images to build | |
matrix: | |
IMAGE_VARIANT: | |
- Dockerfile | |
# - Dockerfile-deb # don't build deb package for now | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
if: ${{ github.event.action }} != 'workflow_dispatch' | |
- name: Checkout, ref = ${{ github.ref_name }} | |
uses: actions/checkout@v2 | |
if: ${{ github.event.action }} == 'workflow_dispatch' | |
with: | |
ref: ${{ github.ref_name }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ${{ matrix.IMAGE_VARIANT }} | |
tags: quota-microservices | |
push: false | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Extract built package | |
uses: shrink/actions-docker-extract@v3 | |
id: extract | |
with: | |
image: quota-microservices | |
path: /output/. | |
destination: output | |
# Archive the built package | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: compiled-artifacts | |
path: output |