Skip to content

Commit

Permalink
Github action use new generated cosign key
Browse files Browse the repository at this point in the history
Signed-off-by: Denny Hoang <[email protected]>
  • Loading branch information
DennyHoang committed Apr 7, 2022
1 parent 2beca8f commit 3b6c409
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/kind-cluster-image-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,22 @@ jobs:
fi
echo '::endgroup::'
- name: Generate New Signing Key
run: |
COSIGN_PASSWORD="" ./cosign generate-key-pair
- name: Deploy ClusterImagePolicy With Key Signing
run: |
kubectl apply -f ./test/testdata/cosigned/e2e/cip-key.yaml
yq '. | .spec.authorities[0].key.data |= load_str("cosign.pub")' ./test/testdata/cosigned/e2e/cip-key.yaml | \
kubectl apply -f -
- name: Sign demoimage with cosign-test key
run: |
./cosign sign --key ./.github/workflows/cosign-test.key --force --allow-insecure-registry ${{ env.demoimage }}
./cosign sign --key cosign.key --force --allow-insecure-registry ${{ env.demoimage }}
- name: Verify with cosign
run: |
./cosign verify --key ./.github/workflows/cosign-test.pub --allow-insecure-registry ${{ env.demoimage }}
./cosign verify --key cosign.pub --allow-insecure-registry ${{ env.demoimage }}
- name: Deploy jobs and verify signed works, unsigned fails
run: |
Expand Down

0 comments on commit 3b6c409

Please sign in to comment.