Skip to content

Commit 854e22c

Browse files
johntmyersdrew
authored andcommitted
fix(ci): use env context instead of secrets in step-level if condition (#452)
The secrets context is not available in step-level if expressions in GitHub Actions — only in with and env blocks. This caused the workflow file to be invalid, failing every run with: Unrecognized named-value: 'secrets' Fix by exporting the secret to a job-level env var and checking that in the step condition instead. Co-authored-by: John Myers <johntmyers@users.noreply.github.com>
1 parent d2f542e commit 854e22c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/vouch-check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ jobs:
1212
vouch-gate:
1313
if: github.repository_owner == 'NVIDIA'
1414
runs-on: ubuntu-latest
15+
env:
16+
ORG_READ_TOKEN: ${{ secrets.ORG_READ_TOKEN }}
1517
steps:
1618
- name: Check org membership
1719
id: org-check
18-
if: ${{ secrets.ORG_READ_TOKEN != '' }}
20+
if: env.ORG_READ_TOKEN != ''
1921
uses: actions/github-script@v7
2022
with:
2123
github-token: ${{ secrets.ORG_READ_TOKEN }}

0 commit comments

Comments
 (0)