fix: repair architecture-submission.yml so the architecture-ready label actually triggers it - #815
Merged
Conversation
…el actually triggers it jobs.import.if referenced env.SUBMISSION_LABEL, but the env context isn't available in a job-level if: (only within its steps, per GitHub's context availability rules). GitHub drops that condition silently instead of failing loudly, so the job never ran for any issues:labeled event, including #813's architecture-ready label. Inline the literal in the if: condition instead. Add a regression test that fails if any workflow's job-level if: references the env context again. Fixes #813 Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
jobs.import.ifinarchitecture-submission.ymlread:The
envcontext is not available in a job-levelif:— it's onlypopulated once a job's steps start running (see context
availability:
jobs.<job_id>.ifonly exposesgithub,inputs,needs, andvars).GitHub doesn't error on this; it just never lets the condition evaluate
truthy, so the
importjob silently never ran, for anyissues: labeledevent on any label, since the workflow was added in #805.This is exactly what happened on #813: applying the
architecture-readylabel produced no workflow run at all (confirmed via
gh api repos/cncf/endusers/actions/workflows/369493783/runs, which shows zeroevent: issuesruns, ever).actionlintcatches this immediately:Fix
if:condition instead of referencingenv.SUBMISSION_LABEL(which stays as-is for the steps that alreadyreference it, where
envis valid).tests/workflow-scripts.test.mjs) that fails ifany workflow's job-level
if:references theenvcontext again.Verified it fails against the pre-fix workflow and passes after.
Testing
npx actionlint .github/workflows/*.yml- clean.npm run test:unit- 1421 passed, 0 failed.passes against the fix.
Fixes #813