File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -171,13 +171,15 @@ jobs:
171
171
172
172
- name : Check if the `pythonbuild` crate changed
173
173
id : check-pythonbuild
174
+ env :
175
+ BASE_REF : ${{ github.event.pull_request.base.ref || 'main' }}
174
176
run : |
175
- if git diff --quiet ${{ github.event.pull_request.base.sha || 'origin/main' }}...HEAD -- ':src/*.rs'; then
177
+ merge_base=$(git merge-base HEAD "origin/${BASE_REF}")
178
+ if git diff --quiet "${merge_base}...HEAD" -- ':src/*.rs'; then
176
179
echo "changed=false" >> "$GITHUB_OUTPUT"
177
180
else
178
181
echo "changed=true" >> "$GITHUB_OUTPUT"
179
182
fi
180
-
181
183
182
184
build-0 :
183
185
needs :
Original file line number Diff line number Diff line change @@ -81,12 +81,16 @@ jobs:
81
81
82
82
- name : Check if the `pythonbuild` crate changed
83
83
id : check-pythonbuild
84
+ env :
85
+ BASE_REF : ${{ github.event.pull_request.base.ref || 'main' }}
84
86
run : |
85
- if git diff --quiet ${{ github.event.pull_request.base.sha || 'origin/main' }}...HEAD -- ':src/*.rs'; then
87
+ merge_base=$(git merge-base HEAD "origin/${BASE_REF}")
88
+ if git diff --quiet "${merge_base}...HEAD" -- ':src/*.rs'; then
86
89
echo "changed=false" >> "$GITHUB_OUTPUT"
87
90
else
88
91
echo "changed=true" >> "$GITHUB_OUTPUT"
89
92
fi
93
+
90
94
build :
91
95
needs :
92
96
- generate-matrix
Original file line number Diff line number Diff line change @@ -79,12 +79,13 @@ jobs:
79
79
echo "any_builds=false" >> $GITHUB_OUTPUT
80
80
fi
81
81
82
-
83
82
- name : Check if the `pythonbuild` crate changed
84
83
id : check-pythonbuild
85
- shell : bash
84
+ env :
85
+ BASE_REF : ${{ github.event.pull_request.base.ref || 'main' }}
86
86
run : |
87
- if git diff --quiet ${{ github.event.pull_request.base.sha || 'origin/main' }}...HEAD -- ':src/*.rs'; then
87
+ merge_base=$(git merge-base HEAD "origin/${BASE_REF}")
88
+ if git diff --quiet "${merge_base}...HEAD" -- ':src/*.rs'; then
88
89
echo "changed=false" >> "$GITHUB_OUTPUT"
89
90
else
90
91
echo "changed=true" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments