Skip to content

fix(ci): use env context instead of secrets in step-level if condition#452

Merged
johntmyers merged 1 commit intomainfrom
fix/vouch-check-secrets-context
Mar 18, 2026
Merged

fix(ci): use env context instead of secrets in step-level if condition#452
johntmyers merged 1 commit intomainfrom
fix/vouch-check-secrets-context

Conversation

@johntmyers
Copy link
Collaborator

Summary

  • The vouch-check workflow is broken on main — every run fails with Unrecognized named-value: 'secrets'
  • The secrets context is not available in step-level if expressions in GitHub Actions, only in with and env blocks

Changes

  • Export ORG_READ_TOKEN to a job-level env var
  • Check env.ORG_READ_TOKEN != '' in the step if instead of secrets.ORG_READ_TOKEN != ''

Checklist

  • Follows Conventional Commits format
  • No new dependencies introduced

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.
@johntmyers johntmyers requested a review from a team as a code owner March 18, 2026 17:18
@johntmyers johntmyers merged commit 3566e55 into main Mar 18, 2026
9 checks passed
@johntmyers johntmyers deleted the fix/vouch-check-secrets-context branch March 18, 2026 17:20
drew pushed a commit that referenced this pull request Mar 18, 2026
#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant