Skip to content

Fix external repo CI: runner context invalid in job-level env block#4989

Draft
Copilot wants to merge 2 commits intodevelfrom
copilot/fix-external-repo-ci-issues
Draft

Fix external repo CI: runner context invalid in job-level env block#4989
Copilot wants to merge 2 commits intodevelfrom
copilot/fix-external-repo-ci-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Related Issue(s) #4988
Has Unit Tests (y/n) n
Documentation Included (y/n) n
Generative AI was used in this contribution (y/n) y

Change Description

All four external repo CI workflows (ext-build-math-comp, ext-build-led-blinker, ext-build-hello-world, ext-build-examples-repo) have been failing with total_jobs: 0 since PR #4764 merged on Feb 26, 2026.

Root cause: PR #4764 placed VERBOSE_FLAG: ${{ runner.debug == '1' && '--verbose' || '' }} in the job-level env: block. The runner context is not available at jobs.<job_id>.env — only at step-level contexts. GitHub Actions fails workflow schema validation before any jobs start.

Fix: Remove VERBOSE_FLAG from both job-level env: blocks in reusable-project-builder.yml and export it via $GITHUB_ENV in a step (where runner context is valid):

- name: "Set verbose flag"
  run: echo "VERBOSE_FLAG=${{ runner.debug == '1' && '--verbose' || '' }}" >> $GITHUB_ENV
  shell: bash

FPRIME_LOCATION and TARGET_PLATFORM remain in job-level env: — they use inputs.* context which is valid there.

Rationale

GitHub Actions context availability rules prohibit runner.* in job-level env: blocks. Moving to a step export fixes validation without reverting any of the security improvements from #4764.

Testing/Review Recommendations

Verify that the external repo CI workflows start producing jobs again (previously all runs showed total_jobs: 0). No functional behavior changes — VERBOSE_FLAG is still empty unless debug logging is enabled.

Future Work

None.

AI Usage (see policy)

Copilot coding agent used for root cause analysis (tracing failure onset to specific commit via GitHub Actions run history) and implementing the fix.

Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix external repo CI not running correctly Fix external repo CI: runner context invalid in job-level env block Apr 10, 2026
Copilot AI requested a review from thomas-bc April 10, 2026 01:16
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.

External Repo CI not running correctly

3 participants