Skip to content

Commit dacc6fa

Browse files
committed
Add permissions and signing process
1 parent e5af224 commit dacc6fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/_containerTemplate.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ jobs:
4141
continue-on-error: false
4242
environment: ${{ inputs.environment }}
4343

44+
permissions:
45+
contents: read
46+
packages: write
47+
id-token: write
48+
4449
steps:
4550
# Check Out Repository
4651
- name: Check Out Repository
@@ -108,8 +113,7 @@ jobs:
108113
id: sign
109114
# if: ${{ github.event_name != 'pull_request' }}
110115
run: |
111-
echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
116+
cosign sign --yes "${TAGS}@${DIGEST}"
112117
env:
113-
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
114118
TAGS: ${{ steps.metadata.outputs.tags }}
115119
DIGEST: ${{ steps.build_push.outputs.digest }}

0 commit comments

Comments
 (0)