Skip to content

Commit 5e5931c

Browse files
committed
Adjust workflow configuration files to permission system
1 parent 3e1e5ae commit 5e5931c

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ jobs:
1010
hello_world_job:
1111
runs-on: ubuntu-latest
1212
name: Check coverage
13+
permissions:
14+
# Gives the action the necessary permissions for publishing new
15+
# comments in pull requests.
16+
pull-requests: write
17+
# Gives the action the necessary permissions for pushing data to the
18+
# python-coverage-comment-action branch, and for editing existing
19+
# comments (to avoid publishing multiple comments in the same PR)
20+
contents: write
1321
steps:
1422
- uses: actions/checkout@v3
1523

.github/workflows/coverage.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ jobs:
1111
name: Run tests & display coverage
1212
runs-on: ubuntu-latest
1313
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
14+
permissions:
15+
# Gives the action the necessary permissions for publishing new
16+
# comments in pull requests.
17+
pull-requests: write
18+
# Gives the action the necessary permissions for editing existing
19+
# comments (to avoid publishing multiple comments in the same PR)
20+
contents: write
21+
# Gives the action the necessary permissions for looking up the
22+
# workflow that launched this workflow, and download the related
23+
# artifact that contains the comment to be published
24+
actions: read
1425
steps:
1526

1627
- name: Post comment

0 commit comments

Comments
 (0)