From de1e8ccb00e896facb428c47bdaca542429e24a0 Mon Sep 17 00:00:00 2001 From: akern40 Date: Sun, 18 Oct 2026 23:08:50 +0000 Subject: [PATCH] ci: report conclusion for PRs that ci.yaml skips Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/ci-skipped.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/ci-skipped.yaml diff --git a/.github/workflows/ci-skipped.yaml b/.github/workflows/ci-skipped.yaml new file mode 100644 index 000000000..0846d2025 --- /dev/null +++ b/.github/workflows/ci-skipped.yaml @@ -0,0 +1,31 @@ +# `ci.yaml` skips PRs that only touch the paths below, which would leave its required +# `conclusion` check pending forever. This reports `conclusion` for those PRs instead. +# Keep `paths` in sync with `paths-ignore` in `ci.yaml`. +on: + pull_request: + paths: + - '.github/workflows/latest-deps.yaml' + +name: Continuous integration (skipped) + +permissions: + pull-requests: read + +jobs: + conclusion: + runs-on: ubuntu-latest + steps: + - name: Check that only CI-ignored files changed + env: + GH_TOKEN: ${{ github.token }} + IGNORED: | + .github/workflows/latest-deps.yaml + run: | + other=$(gh api --paginate "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --jq '.[].filename' \ + | grep -vxF -f <(printf '%s' "$IGNORED") || true) + if [ -n "$other" ]; then + echo "This PR also changes files that ci.yaml checks, so its conclusion is the one that counts:" + echo "$other" + exit 1 + fi + echo "Only files ignored by ci.yaml changed."