-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(actions): Use lowercase workaround in verify, correct its usage
- Loading branch information
Showing
2 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,21 +27,20 @@ runs: | |
username: ${{ github.actor }} | ||
password: ${{ inputs.registry-token }} | ||
|
||
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. | ||
- name: Install cosign | ||
uses: sigstore/[email protected] | ||
|
||
# https://github.com/macbre/push-to-ghcr/issues/12 | ||
- name: Lowercase Registry | ||
id: registry_case | ||
uses: ASzc/change-string-case-action@v6 | ||
- name: Lowercase container path | ||
id: container_case | ||
uses: ASzc/change-string-case-action@v5 | ||
with: | ||
string: ${{ inputs.container }} | ||
|
||
- name: Install cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Sign container image | ||
shell: bash | ||
run: | | ||
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ inputs.container }}@${TAGS} | ||
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.container_case.outputs.lowercase }}@${TAGS} | ||
env: | ||
COSIGN_EXPERIMENTAL: false | ||
COSIGN_PRIVATE_KEY: ${{ inputs.signing-secret }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,15 @@ runs: | |
- name: Install cosign | ||
uses: sigstore/[email protected] | ||
|
||
# https://github.com/macbre/push-to-ghcr/issues/12 | ||
- name: Lowercase container path | ||
id: container_case | ||
uses: ASzc/change-string-case-action@v5 | ||
with: | ||
string: ${{ inputs.container }} | ||
|
||
- name: Verify container | ||
shell: bash | ||
run: cosign verify --key ${{ inputs.pubkey }} ${{ inputs.container }} | ||
run: cosign verify --key ${{ inputs.pubkey }} ${{ steps.container_case.outputs.lowercase }} | ||
env: | ||
COSIGN_EXPERIMENTAL: false |