Skip to content

Commit

Permalink
Update permissions for 'checks' (#3844)
Browse files Browse the repository at this point in the history
update permissions for checks
  • Loading branch information
tamirkamara authored Feb 8, 2024
1 parent 7be040b commit d080e11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy_tre_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ jobs:
deploy_management:
name: Deploy Management
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
environment: ${{ inputs.environmentName }}
steps:
- name: Show inputs
Expand Down Expand Up @@ -173,7 +176,7 @@ jobs:
- name: Report check status start
if: inputs.prHeadSha != ''
uses: LouisBrunner/checks-action@v1.6.0
uses: LouisBrunner/checks-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ inputs.prHeadSha }}
Expand Down Expand Up @@ -806,6 +809,9 @@ jobs:
name: Summary
needs: [e2e_tests_smoke, e2e_tests_custom]
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
if: always()
environment: ${{ inputs.environmentName }}
steps:
Expand All @@ -816,7 +822,7 @@ jobs:
# If prHeadSha is specified then explicity mark the checks for that SHA
- name: Report check status
if: inputs.prHeadSha != ''
uses: LouisBrunner/checks-action@v1.6.0
uses: LouisBrunner/checks-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
# the name must be identical to the one received by the real job
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr_comment_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
permissions:
pull-requests: write
checks: write
contents: read
outputs:
command: ${{ steps.check_command.outputs.command }}
prRef: ${{ steps.check_command.outputs.prRef }}
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
# and will have to send it "manually"
- name: Bypass E2E check-runs status
if: ${{ steps.check_command.outputs.command == 'test-force-approve' }}
uses: LouisBrunner/checks-action@v1.6.0
uses: LouisBrunner/checks-action@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
# the name must be identical to the one received by the real job
Expand Down

0 comments on commit d080e11

Please sign in to comment.