Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit ff13693

Browse files
committed
Wrong usage of bash variable leading to error in workflow
1 parent 940343b commit ff13693

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/build-and-push-v2.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ jobs:
107107
- name: Sign the images with GitHub OIDC Token
108108
run: |
109109
set -e
110-
for image in "${IMAGES}"; do
111-
yes | cosign sign ${image}@${DIGEST}
110+
111+
# In variables, "%%*( )" trim whitespace at beggining and end of variable
112+
for image in ${IMAGES}; do
113+
cosign sign "${image%%*( )}@${DIGEST%%*( )}"
112114
done
113115
env:
114-
TAGS: ${{ steps.build.outputs.tags }}
116+
TAGS: ${{ steps.meta.outputs.tags }}
115117
DIGEST: ${{ steps.build.outputs.digest }}
116118
COSIGN_EXPERIMENTAL: true
117119
if: github.event_name != 'pull_request'

0 commit comments

Comments
 (0)