From 8f5aefc29f031cb4355e2f0794165e9b29927f4c Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Mon, 18 Dec 2023 14:00:08 -0700 Subject: [PATCH] fix(actions): Use lowercase workaround in verify, correct its usage --- sign/action.yml | 15 +++++++-------- verify/action.yml | 9 ++++++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/sign/action.yml b/sign/action.yml index 7cd0742..a5d3f60 100644 --- a/sign/action.yml +++ b/sign/action.yml @@ -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/cosign-installer@v3.3.0 + # 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/cosign-installer@v3.3.0 - - 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 }} diff --git a/verify/action.yml b/verify/action.yml index 04b9445..cdadc27 100644 --- a/verify/action.yml +++ b/verify/action.yml @@ -14,8 +14,15 @@ runs: - name: Install cosign uses: sigstore/cosign-installer@v3.3.0 + # 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