Skip to content

Commit a1f5d22

Browse files
committed
fix: resolve composite actions secrets access errors
- Remove direct secrets.GITHUB_TOKEN and secrets.NPM_TOKEN references from composite action defaults - Pass secrets explicitly as required parameters from workflow level - Fix docker-build-setup, create-release, and publish-npm actions - Update ci.yml to pass secrets to all composite action calls
1 parent e43b357 commit a1f5d22

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/actions/create-release/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ inputs:
1515
default: 'false'
1616
token:
1717
description: 'GitHub token'
18-
required: false
19-
default: ${{ secrets.GITHUB_TOKEN }}
18+
required: true
2019
runs:
2120
using: 'composite'
2221
steps:

.github/actions/docker-build-setup/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ inputs:
4747
default: ${{ github.actor }}
4848
password:
4949
description: 'Registry password'
50-
required: false
51-
default: ${{ secrets.GITHUB_TOKEN }}
50+
required: true
5251
login-enabled:
5352
description: 'Enable registry login'
5453
required: false

.github/actions/publish-npm/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ inputs:
1111
default: 'https://registry.npmjs.org'
1212
token:
1313
description: 'NPM auth token'
14-
required: false
15-
default: ${{ secrets.NPM_TOKEN }}
14+
required: true
1615
publish-command:
1716
description: 'Publish command to run'
1817
required: false

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
3636
platforms: linux/amd64
3737
is-pr: ${{ github.event_name == 'pull_request' }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
3839

3940
- name: Run containerized tests
4041
run: |
@@ -156,6 +157,7 @@ jobs:
156157
cache-from: type=gha
157158
cache-to: type=gha,mode=max
158159
login-enabled: false
160+
password: ${{ secrets.GITHUB_TOKEN }}
159161

160162
- name: Build native binaries
161163
uses: ./.github/actions/build-native-binaries
@@ -186,6 +188,7 @@ jobs:
186188
tags: security-scan:latest
187189
cache-from: type=gha
188190
login-enabled: false
191+
password: ${{ secrets.GITHUB_TOKEN }}
189192

190193
- name: Run Trivy vulnerability scanner
191194
uses: aquasecurity/trivy-action@master
@@ -225,13 +228,15 @@ jobs:
225228
platforms: linux/amd64,linux/arm64
226229
cache-from: type=gha
227230
cache-to: type=gha,mode=max
231+
password: ${{ secrets.GITHUB_TOKEN }}
228232

229233
- name: Create GitHub Release
230234
uses: ./.github/actions/create-release
231235
with:
232236
generate-notes: true
233237
draft: false
234238
prerelease: false
239+
token: ${{ secrets.GITHUB_TOKEN }}
235240

236241
# NPM publish job (only on tags)
237242
publish:
@@ -247,4 +252,6 @@ jobs:
247252
uses: actions/checkout@v4
248253

249254
- name: Publish to NPM
250-
uses: ./.github/actions/publish-npm
255+
uses: ./.github/actions/publish-npm
256+
with:
257+
token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)