Skip to content

Commit c385a0e

Browse files
committed
Update Github action
1 parent e0859f0 commit c385a0e

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/ci-checks.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,37 @@ on:
1111
pull_request:
1212
types: [opened, synchronize, reopened]
1313

14-
permissions:
15-
checks: read
16-
pull-requests: write
17-
1814
jobs:
1915
reset_ci_passed_label:
2016
if: github.event_name == 'pull_request' && (github.event.action == 'synchronize' || github.event.action == 'reopened')
2117
runs-on: ubuntu-latest
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
permissions:
19+
checks: read
20+
pull-requests: write
2421
steps:
2522
- name: Reset ci-passed label status on PR Syncronization
2623
run: |
2724
echo "Resetting 'ci-passed' label as new changes have been pushed."
2825
gh pr edit ${{ github.event.pull_request.number }} --remove-label "ci-passed" --repo $GITHUB_REPOSITORY || echo "Label not present"
29-
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3028
check_ci_status:
3129
runs-on: ubuntu-latest
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
permissions:
31+
checks: read
32+
pull-requests: write
3433
steps:
3534
- name: Check if all CI checks passed
3635
uses: wechuli/allcheckspassed@0b68b3b7d92e595bcbdea0c860d05605720cf479
37-
with:
38-
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
36+
with:
3937
delay: '5'
4038
retries: '7'
41-
polling_interval: '5'
39+
polling_interval: '5'
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4242
- name: Add 'ci-passed' label
4343
if: success()
4444
run: |
45-
gh pr edit ${{ github.event.pull_request.number }} --add-label "ci-passed" --repo $GITHUB_REPOSITORY
45+
gh pr edit ${{ github.event.pull_request.number }} --add-label "ci-passed" --repo $GITHUB_REPOSITORY
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)