Skip to content

Commit

Permalink
[CI]: add minimum GitHub token permissions for workflows (open-mmlab#…
Browse files Browse the repository at this point in the history
…8928)

* ci: add minimum GitHub token permissions for workflows
Signed-off-by: Ashish Kurmi <[email protected]>

* removing yaml comments

Signed-off-by: Ashish Kurmi <[email protected]>

Signed-off-by: Ashish Kurmi <[email protected]>
  • Loading branch information
ashishkurmi authored and Théo Megy committed May 5, 2023
1 parent 7c0772d commit 10a09b8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build_cpu:
runs-on: ubuntu-18.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build_pat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build_parrots:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build-n-publish:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ on:
# check issue and pull request once every day
- cron: '25 11 * * *'

permissions:
contents: read

jobs:
invalid-stale-close:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test_mim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build_cpu:
runs-on: ubuntu-18.04
Expand Down

0 comments on commit 10a09b8

Please sign in to comment.