Skip to content

Commit

Permalink
Fix GH Actions issue: run and uses are mutually exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Aug 12, 2022
1 parent a7e5b37 commit e3615e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Install cosign ⬇️
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: sigstore/cosign-installer@main

- name: Copy the cosign keys 📋
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
Expand All @@ -77,14 +81,12 @@ jobs:

- name: Sign the Docker image ✍️
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: sigstore/cosign-installer@main
run: cosign sign --key cosign.key mostafamoradian/xk6-kafka:${{ steps.meta.outputs.tags }}
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}

- name: Verify the Docker image signature ✅
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: sigstore/cosign-installer@main
run: cosign verify --key cosign.pub mostafamoradian/xk6-kafka:${{ steps.meta.outputs.tags }}

- name: Remove the cosign keys 🧹
Expand Down

0 comments on commit e3615e0

Please sign in to comment.