Skip to content
Draft
26 changes: 25 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
attestations: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

Expand Down Expand Up @@ -56,3 +56,27 @@ jobs:
subject-name: ghcr.io/github/artifact-attestations-opa-provider
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

- name: Log in to Azure Container Registry (ACR)
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ${{ secrets.ACR_MODA_REGISTRY }}
username: ${{ secrets.ACR_MODA_USER }}
password: ${{ secrets.ACR_MODA_TOKEN }}

- name: Build and push Docker image to ACR
id: build
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.ACR_MODA_REGISTRY }}/artifact-attestations-opa-provider:${{ steps.version.outputs.tag }}
platforms: linux/amd64,linux/arm64

- name: Attest build provenance for ACR
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
with:
subject-name: ${{ secrets.ACR_MODA_REGISTRY }}/artifact-attestations-opa-provider
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true