mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-19 19:44:52 +00:00
refactor: avoid subshell, sign image with env. var (#30)
Works in main, propagating here. Co-authored-by: xnasero@posteo.net
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
COMMIT_TAGS=()
|
||||
BUILD_TAGS=()
|
||||
# Have tags for tracking builds during pull request
|
||||
SHA_SHORT="$(git rev-parse --short HEAD)"
|
||||
SHA_SHORT="${GITHUB_SHA::7}"
|
||||
COMMIT_TAGS+=("pr-${{ github.event.number }}-${MAJOR_VERSION}")
|
||||
COMMIT_TAGS+=("${SHA_SHORT}-${MAJOR_VERSION}")
|
||||
|
||||
@@ -142,10 +142,10 @@ jobs:
|
||||
# Only needed when running `cosign sign` using a key
|
||||
- name: Write signing key to disk
|
||||
run: |
|
||||
echo "${{ env.COSIGN_PRIVATE_KEY }}" > cosign.key
|
||||
# DEBUG: get character count of key
|
||||
wc -c cosign.key
|
||||
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS}
|
||||
env:
|
||||
TAGS: ${{ steps.push.outputs.digest }}
|
||||
COSIGN_EXPERIMENTAL: false
|
||||
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
|
||||
Reference in New Issue
Block a user