Skip to content

Commit 28d00af

Browse files
PlaidCatkerneltoast
authored andcommitted
github actions: skip JIRA checks forks
There are many workflows that are useful without the JIRA checks from Forks. We're still evaluating how to best deal with this without a lot of engineer overhead to check external contributors.
1 parent f55b713 commit 28d00af

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/validate-kernel-commits.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,25 @@ jobs:
152152
exit 1
153153
fi
154154
155+
- name: Determine if JIRA PR check should run
156+
id: should_check_jira
157+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
158+
155159
- name: Install JIRA PR Check dependencies
160+
needs: should_check_jira
156161
run: |
157162
python -m pip install --upgrade pip
158163
pip install jira
159164
160165
- name: Mask JIRA credentials
166+
needs: should_check_jira
161167
run: |
162168
echo "::add-mask::${{ secrets.JIRA_API_TOKEN }}"
163169
echo "::add-mask::${{ secrets.JIRA_API_USER }}"
164170
echo "::add-mask::${{ secrets.JIRA_URL }}"
165171
166172
- name: Run JIRA PR Check
173+
needs: should_check_jira
167174
id: jira_check
168175
continue-on-error: true # Allow PR comments to be posted before failing workflow
169176
env:
@@ -213,6 +220,7 @@ jobs:
213220
exit $EXIT_CODE
214221
215222
- name: Comment PR with JIRA issues
223+
needs: should_check_jira
216224
if: steps.jira_check.outputs.has_issues == 'true'
217225
env:
218226
GH_TOKEN: ${{ github.token }}
@@ -225,6 +233,7 @@ jobs:
225233
fi
226234
227235
- name: Request changes if LTS mismatch
236+
needs: should_check_jira
228237
if: steps.jira_check.outputs.has_lts_mismatch == 'true'
229238
env:
230239
GH_TOKEN: ${{ github.token }}
@@ -235,6 +244,7 @@ jobs:
235244
--repo "${{ github.repository }}"
236245
237246
- name: Fail workflow if JIRA errors found
247+
needs: should_check_jira
238248
if: steps.jira_check.outcome == 'failure'
239249
run: |
240250
echo "❌ JIRA PR check failed - errors were found in one or more commits"

0 commit comments

Comments
 (0)