Build images #82
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
--- | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
name: Build images | |
jobs: | |
generate-images-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.generate-images-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Generate images matrix | |
id: generate-images-matrix | |
run: echo "matrix={\"images\":[$(ls -mQ images)]}" | tee $GITHUB_OUTPUT | |
build-images: | |
runs-on: ubuntu-latest | |
needs: generate-images-matrix | |
strategy: | |
matrix: | |
image: ${{ fromJSON(needs.generate-images-matrix.outputs.matrix).images }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Github container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build image | |
run: ./.github/scripts/build-image.sh ${{ matrix.image }} |