Skip to content

Commit

Permalink
Switching to matrix build
Browse files Browse the repository at this point in the history
Updates to use a matrix build
  • Loading branch information
daveismith committed Jul 24, 2024
1 parent 52310c3 commit 7c46a9a
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/release-to-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@ env:
jobs:
build-and-push-image:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- context: backend/ShootTheMoon
file: backend/ShootTheMoon/ShootTheMoon/Dockerfile
name: backend
- context: proxy
file: proxy/Dockerfile
name: proxy
- context: frontend/shoot-client
file: frontend/shoot-client/Dockerfile
name: frontend


permissions:
contents: read
packages: write
Expand All @@ -39,21 +52,21 @@ jobs:
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}_${{ matrix.name }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: backend/ShootTheMoon
file: backend/ShootTheMoon/ShootTheMoon/Dockerfile
context: ${{ matrix.context }}
file: ${{ matrix.file }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-name: ${{ env.REGISTRY }}/${{ matrix.name }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit 7c46a9a

Please sign in to comment.