Skip to content

Commit c5c80f0

Browse files
authored
fix(ci): trigger required checks on automated PRs (#156)
1 parent 70c8dfc commit c5c80f0

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/weekly-update.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,21 @@ jobs:
273273
--head "$BRANCH_NAME" \
274274
--base main
275275
276+
# Pushes made with GITHUB_TOKEN don't trigger other workflows.
277+
# Close/reopen the PR to generate a pull_request.reopened event,
278+
# which triggers required CI and enterprise audit workflows.
279+
- name: Trigger CI checks
280+
if: steps.final.outputs.success == 'true' && steps.validate.outputs.valid == 'true' && steps.changes.outputs.has-changes == 'true'
281+
env:
282+
GH_TOKEN: ${{ github.token }}
283+
BRANCH_NAME: ${{ steps.branch.outputs.branch }}
284+
run: |
285+
pr_number=$(gh pr list --head "$BRANCH_NAME" --json number --jq '.[0].number')
286+
if [ -n "$pr_number" ]; then
287+
gh pr close "$pr_number"
288+
gh pr reopen "$pr_number"
289+
fi
290+
276291
- name: Add job summary
277292
if: steps.final.outputs.success == 'true' && steps.validate.outputs.valid == 'true' && steps.changes.outputs.has-changes == 'true'
278293
env:

0 commit comments

Comments
 (0)