Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample of permissions/Fix permissions of existing jobs #162

Merged
merged 3 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/live-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ on:
pull_request:

permissions:
contents: read
contents: write
checks: write
pull-requests: write

jobs:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/multiple-files.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Test Multipli File
on:
pull_request:

permissions:
contents: write
checks: write
pull-requests: write

jobs:
test-multiple-files:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
push:

permissions:
contents: write
checks: write
pull-requests: write

jobs:
test-branch:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/update-coverage-on-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ on:
push:
branches:
- test-branch

permissions:
contents: write
checks: write
pull-requests: write

jobs:
update-coverage-on-readme:
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ on:
pull_request:
branches:
- '*'

# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
# `contents` is for permission to the contents of the repository.
# `pull-requests` is for permission to pull request
permissions:
contents: write
checks: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -226,6 +235,15 @@ If your coverage html report will not change, it wouldn't push any changes to re
name: Update Coverage on Readme
on:
push:

# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
# `contents` is for permission to the contents of the repository.
# `pull-requests` is for permission to pull request
permissions:
contents: write
checks: write
pull-requests: write

jobs:
update-coverage-on-readme:
runs-on: ubuntu-latest
Expand Down
Loading