Skip to content

Make CLI build workflow usable as a PR required check#464

Merged
rajbos merged 2 commits intomainfrom
copilot/setup-cli-build-workflow-pr-check
Mar 22, 2026
Merged

Make CLI build workflow usable as a PR required check#464
rajbos merged 2 commits intomainfrom
copilot/setup-cli-build-workflow-pr-check

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 22, 2026

The CLI build workflow only triggers on PRs that touch CLI-relevant paths, so GitHub never reports a status for unrelated PRs — making it impossible to use as a required status check.

Changes

  • Remove paths filter from pull_request trigger so the workflow runs on every PR to main
  • Add check-changes job using dorny/paths-filter (SHA-pinned) to detect CLI-relevant file changes
  • Gate build-and-validate on check-changes output — skips cleanly when no relevant files changed, completing the workflow as green
  • push trigger unchanged — still path-filtered since it doesn't need to serve as a required check

The check-changes output auto-resolves to true for push events (already path-filtered by the trigger) and delegates to dorny/paths-filter for pull_request events:

outputs:
  cli-relevant: ${{ github.event_name == 'push' || steps.filter.outputs.cli-relevant == 'true' }}

Once merged, build-and-validate can be added as a required status check on main.

Remove path filters from pull_request trigger so the workflow runs on every
PR to main. Add a check-changes job using dorny/paths-filter to detect
CLI-relevant file changes. The build-and-validate job is conditional on
that output, so it skips cleanly when no relevant files changed — making
this workflow suitable as a PR required status check.

Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rajbos/github-copilot-token-usage/sessions/3c397486-6198-42c5-949b-52436ad2c2eb
@rajbos rajbos marked this pull request as ready for review March 22, 2026 04:19
@rajbos rajbos enabled auto-merge (squash) March 22, 2026 04:19
@rajbos rajbos merged commit a5bd9e5 into main Mar 22, 2026
20 of 24 checks passed
@rajbos rajbos deleted the copilot/setup-cli-build-workflow-pr-check branch March 22, 2026 04:21
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