Skip to content

Commit a655edf

Browse files
committed
ci: fix required checks blocking Dependabot PRs
Remove paths-ignore from release-validation workflow and add a check-paths job that detects whether the full validation should run. When only docs/ or website/ files change, the build-artifacts and install-and-smoke jobs are skipped rather than never triggered, which satisfies branch protection required check requirements.
1 parent b707b1d commit a655edf

1 file changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/release-validation.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ on:
3535
- 'v*.*.*-incubating-RC*'
3636
pull_request:
3737
types: [opened, synchronize, reopened]
38-
paths-ignore:
39-
- 'docs/**'
40-
- 'website/**'
41-
# Note: do NOT use '**/*.md' here. Some bundled examples ship .md files
42-
# (e.g. examples/deployment/aws/terraform/tutorial.md) and a missing
43-
# ASF header on those would cause a real RAT failure we want to catch.
4438
workflow_dispatch:
4539

4640
concurrency:
@@ -51,8 +45,34 @@ permissions:
5145
contents: read
5246

5347
jobs:
48+
check-paths:
49+
name: "Release Validation / check-paths"
50+
runs-on: ubuntu-latest
51+
timeout-minutes: 5
52+
outputs:
53+
should_run: ${{ steps.check.outputs.should_run }}
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0
58+
- id: check
59+
run: |
60+
if [ "${{ github.event_name }}" != "pull_request" ]; then
61+
echo "should_run=true" >> "$GITHUB_OUTPUT"
62+
exit 0
63+
fi
64+
CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
65+
# If any changed file is outside docs/ and website/, run the full validation
66+
if echo "$CHANGED" | grep -qvE '^(docs/|website/)'; then
67+
echo "should_run=true" >> "$GITHUB_OUTPUT"
68+
else
69+
echo "should_run=false" >> "$GITHUB_OUTPUT"
70+
fi
71+
5472
build-artifacts:
5573
name: "Release Validation / build-artifacts"
74+
needs: check-paths
75+
if: needs.check-paths.outputs.should_run == 'true'
5676
runs-on: ubuntu-latest
5777
timeout-minutes: 20
5878
outputs:
@@ -134,7 +154,8 @@ jobs:
134154

135155
install-and-smoke:
136156
name: "Release Validation / install-and-smoke"
137-
needs: build-artifacts
157+
needs: [check-paths, build-artifacts]
158+
if: needs.check-paths.outputs.should_run == 'true'
138159
runs-on: ubuntu-latest
139160
timeout-minutes: 10
140161
strategy:

0 commit comments

Comments
 (0)