Skip to content

Commit

Permalink
Add explicit permissions, matching the default 'restricted' set, to a…
Browse files Browse the repository at this point in the history
…ll workflows.

see: https://docs.github.com/en/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token

This is an experiment to explore what will break when we switch our org level default from 'permissive' to 'restricted'.

see also: actions/upload-artifact#197 (comment)
  • Loading branch information
QuintinWillison committed Sep 18, 2021
1 parent 63062ac commit fe829bb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/assemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches:
- main

permissions:
contents: read
metadata: read

jobs:
check:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches:
- main

permissions:
contents: read
metadata: read

jobs:
check:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
push:
branches:
- main

permissions:
contents: read
metadata: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/emulate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches:
- main

permissions:
contents: read
metadata: read

jobs:
check:
runs-on: macos-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
description: 'Version, without v prefix, appended to v to locate tag'
required: true

permissions:
contents: read
metadata: read

jobs:
publish:
runs-on: ubuntu-latest
Expand Down

0 comments on commit fe829bb

Please sign in to comment.