diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 137b1c8..0f6ae05 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -19,11 +19,16 @@ jobs: attestations: write id-token: write strategy: + fail-fast: false matrix: platform: - linux/amd64 - linux/arm64 steps: + - name: Prepare environemnt + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Checkout repository uses: actions/checkout@v4 - name: Install cross (for aarch64 builds) @@ -57,6 +62,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push + id: build uses: docker/build-push-action@v6 with: push: true @@ -65,6 +71,18 @@ jobs: file: api/Dockerfile labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 merge: runs-on: ubuntu-latest needs: