Skip to content

ci: replace third-party path-filter actions with local composite#2676

Open
leventebalogh wants to merge 1 commit into
mainfrom
leventebalogh/local-paths-filter
Open

ci: replace third-party path-filter actions with local composite#2676
leventebalogh wants to merge 1 commit into
mainfrom
leventebalogh/local-paths-filter

Conversation

@leventebalogh

@leventebalogh leventebalogh commented May 28, 2026

Copy link
Copy Markdown
Collaborator

What changed?

  • Replaced dorny/paths-filter and tj-actions/changed-files with a small local composite action at .github/actions/paths-filter/

Notes for the reviewer:

  • Falls back to changed=true on non-pull_request* events, matching the previous change-detection composite's defaulting behavior.
  • metadata-lint.yml now requests pull-requests: read so the composite's gh api call is authorized.
  • Each caller's pattern list includes .github/actions/paths-filter/** so changes to the composite itself trigger downstream re-runs.

  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.
Copilot AI review requested due to automatic review settings May 28, 2026 09:46
@leventebalogh leventebalogh requested review from a team as code owners May 28, 2026 09:46
@leventebalogh leventebalogh requested review from mckn, oshirohugo and s4kh and removed request for a team May 28, 2026 09:46
@leventebalogh leventebalogh requested review from ashharrison90 and joshhunt and removed request for a team May 28, 2026 09:46
@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-filter to 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-detection composite wrapping tj-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')
@leventebalogh leventebalogh self-assigned this May 28, 2026
@leventebalogh leventebalogh moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team May 28, 2026
@leventebalogh leventebalogh requested a review from jackw May 28, 2026 09:54
@jackw jackw changed the title CI: Replace third-party path-filter actions with local composite ci: replace third-party path-filter actions with local composite May 29, 2026
@jackw jackw removed the no-changelog label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔬 In review

Development

Successfully merging this pull request may close these issues.

3 participants