Skip to content

Commit

Permalink
feat(ci): Migrate to signing action
Browse files Browse the repository at this point in the history
  • Loading branch information
EyeCantCU committed Dec 19, 2023
1 parent 0a168a9 commit e20f1b7
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,26 +252,14 @@ jobs:
extra-args: |
--disable-content-trust
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Sign container
- uses: sigstore/cosign-installer@v3.2.0
if: github.event_name != 'pull_request'

- name: Sign container image
uses: EyeCantCU/cosign-action/sign@v0.1.2
if: github.event_name != 'pull_request'
run: |
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS}
env:
TAGS: ${{ steps.push.outputs.digest }}
COSIGN_EXPERIMENTAL: false
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}
with:
container: ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}
registry-token: ${{ secrets.GITHUB_TOKEN }}
signing-secret: ${{ secrets.SIGNING_SECRET }}
tags: ${{ steps.push.outputs.digest }}

- name: Echo outputs
if: github.event_name != 'pull_request'
Expand Down

0 comments on commit e20f1b7

Please sign in to comment.