Skip to content

Commit

Permalink
chore: research changes in cosign (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
erka authored May 22, 2024
1 parent 42f7fe9 commit 349e959
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker Builds

on:
push:
tags: [ 'v*' ]
tags: ["v*"]
workflow_dispatch:

env:
Expand All @@ -13,7 +13,6 @@ concurrency:
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
cancel-in-progress: true


jobs:
build-push:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,5 +53,11 @@ jobs:
- name: Sign the published Docker image
if: github.event_name == 'push'
env:
COSIGN_EXPERIMENTAL: "true"
run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
TAGS: ${{ steps.docker_meta.outputs.tags }}
run: |
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}

0 comments on commit 349e959

Please sign in to comment.