Skip to content

Add manual fork-PR CI dispatch to ci.yml - #120

Merged
gavindidrichsen merged 1 commit into
mainfrom
add-manual-fork-ci-dispatch
Oct 21, 2026
Merged

gavindidrichsen merged 1 commit into
mainfrom
add-manual-fork-ci-dispatch

Conversation

@LukasAud

Copy link
Copy Markdown
Contributor

Summary

  • Fork PRs don't get secrets (e.g. PUPPET_FORGE_TOKEN, CODECOV_TOKEN) via the normal pull_request trigger, so CI silently skips secret-dependent steps for external contributors.
  • Adds pr_number/ref inputs to the existing workflow_dispatch: trigger and a resolve-ref job that resolves either into refs/pull/<n>/merge (or the raw ref, or empty string meaning "no override").
  • Threads ref: ${{ needs.resolve-ref.outputs.ref }} into the spec and acceptance jobs' with: blocks, relying on puppetlabs/cat-github-actions PR #191 (merged to main) which added an optional ref input to gem_ci.yml/gem_acceptance.yml.
  • workflow_dispatch is already gated to users with repo write access, so this is the trust boundary — no extra label/approval system added.
  • Both spec and acceptance were already pinned to @main for the reusable workflows, so no pin bump was needed.

Test plan

  • Manually dispatch the workflow with a ref input (e.g. a branch name) and confirm it checks out that ref.
  • Manually dispatch the workflow with a pr_number input (e.g. a fork PR number) and confirm it checks out refs/pull/<n>/merge and secrets are available.
  • Confirm a normal push/pull_request run is unaffected (empty ref passed through, behaves exactly as before).

🤖 Generated with Claude Code

Fork PRs can't run CI jobs that need secrets via the normal
pull_request trigger. Add workflow_dispatch inputs and a resolve-ref
job that resolve a PR number or ref, threaded into the existing CI
jobs via cat-github-actions' gem_ci.yml/gem_acceptance.yml ref input
(puppetlabs/cat-github-actions#191).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@LukasAud
LukasAud requested a review from a team as a code owner October 21, 2026 14:30
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.96%. Comparing base (d9cd390) to head (d811654).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #120   +/-   ##
=======================================
  Coverage   94.96%   94.96%           
=======================================
  Files           2        2           
  Lines         159      159           
=======================================
  Hits          151      151           
  Misses          8        8           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gavindidrichsen
gavindidrichsen merged commit e0837c4 into main Oct 21, 2026
13 checks passed
@gavindidrichsen
gavindidrichsen deleted the add-manual-fork-ci-dispatch branch October 21, 2026 15:01
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.

2 participants