ci: replace third-party path-filter actions with local composite#2676
Open
leventebalogh wants to merge 1 commit into
Open
ci: replace third-party path-filter actions with local composite#2676leventebalogh wants to merge 1 commit into
leventebalogh wants to merge 1 commit into
Conversation
actions with local composite
Adds a local composite at .github/actions/paths-filter that lists
changed files via `gh api /repos/.../pulls/{n}/files --paginate` and matches them against
newline-separated bash glob patterns.
- Drops `dorny/paths-filter` from test-build.yml.
- Drops
`tj-actions/changed-files` from metadata-lint.yml; removes the now-unused `change-detection` composite
that wrapped it.
Contributor
|
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces third-party path-filtering GitHub Actions with a local composite action to reduce CI supply-chain risk while preserving docs-related change detection.
Changes:
- Adds
.github/actions/paths-filterto detect matching PR file changes via the GitHub API. - Updates docs build and metadata lint workflows to use the local action.
- Removes the previous
change-detectioncomposite wrappingtj-actions/changed-files.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/actions/paths-filter/action.yml |
Adds the local composite path-filter implementation. |
.github/actions/change-detection/action.yml |
Removes the old changed-files wrapper action. |
.github/workflows/test-build.yml |
Switches docs build change detection to the new local action. |
.github/workflows/metadata-lint.yml |
Switches metadata lint change detection to the new local action and updates permissions. |
| docs: ${{ steps.filter.outputs.changed }} | ||
| steps: | ||
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| echo "Patterns:" | ||
| printf ' %s\n' "${patterns[@]}" | ||
|
|
||
| mapfile -t changed_files < <(gh api --paginate "/repos/${REPO}/pulls/${PR_NUMBER}/files" --jq '.[].filename') |
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.
What changed?
dorny/paths-filterandtj-actions/changed-fileswith a small local composite action at.github/actions/paths-filter/Notes for the reviewer:
changed=trueon non-pull_request*events, matching the previouschange-detectioncomposite's defaulting behavior.metadata-lint.ymlnow requestspull-requests: readso the composite'sgh apicall is authorized..github/actions/paths-filter/**so changes to the composite itself trigger downstream re-runs.