Skip to content

Commit ec96231

Browse files
committed
feat: Add GitHub token as secret environment variable for Docker build
1 parent c3fa508 commit ec96231

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ jobs:
9898
- name: Build Container ${{ github.repository }}
9999
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
100100
id: build
101+
env:
102+
# Secrets for GH CLI
103+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
101104
with:
102105
file: "./Dockerfile"
103106
context: .
@@ -108,7 +111,7 @@ jobs:
108111
sbom: true
109112
# Secrets for GH CLI
110113
secret-envs: |
111-
GH_TOKEN=${{ github.token }}
114+
GH_TOKEN=GITHUB_TOKEN
112115
113116
# Upload Software Bill of Materials (SBOM) to GitHub
114117
- name: Upload SBOM

0 commit comments

Comments
 (0)