diff --git a/.github/workflows/build-deploy-go.yml b/.github/workflows/build-deploy-go.yml index 0f2dbdf..18b6537 100644 --- a/.github/workflows/build-deploy-go.yml +++ b/.github/workflows/build-deploy-go.yml @@ -81,6 +81,14 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Import GPG Key and List Key IDs + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + run: | + echo "$GPG_PRIVATE_KEY" | gpg --import + # Directly list the keys to see all available information + gpg --list-secret-keys --keyid-format LONG + - name: Import GPG Key env: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} @@ -90,6 +98,13 @@ jobs: git config --global user.signingkey $GPG_KEY_ID git config --global commit.gpgsign true + + - name: Verify Key ID + run: | + # The following command prints the key IDs of all private keys in the keyring + # It does not expose private key material + gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2 + - uses: actions/checkout@v3 with: ref: ${{ inputs.branch }}