Update push-docker.yml

This commit is contained in:
Anthony Stirling 2025-02-24 17:21:58 +00:00 committed by GitHub
parent 50b4473a0a
commit c297b4c561
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,7 +89,6 @@ jobs:
- name: Generate tags fat
id: meta3
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
if: github.ref != 'refs/heads/aws'
with:
images: |
public.ecr.aws/${{ secrets.AWS_PUBLIC_ECR_ALIAS }}/stirling-pdf
@ -100,7 +99,6 @@ jobs:
- name: Build and push main Dockerfile fat
id: build-push-fat
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
if: github.ref != 'refs/heads/aws'
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
@ -115,15 +113,5 @@ jobs:
provenance: true
sbom: true
- name: Sign fat images
if: github.ref == 'refs/heads/master'
env:
DIGEST: ${{ steps.build-push-fat.outputs.digest }}
TAGS: ${{ steps.meta3.outputs.tags }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
run: |
echo "$TAGS" | tr ',' '\n' | while read -r tag; do
cosign sign --key env://COSIGN_PRIVATE_KEY --yes "${tag}@${DIGEST}"
done