mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-23 12:49:41 +08:00
ci: set minimal permissions to workflows (#7070)
* ci: set minimal permissions to workflows Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com> * Fix trailing whitespace on playwright-update.yml Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com> --------- Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com> Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
This commit is contained in:
parent
e43da4a739
commit
5a8c3ad313
4
.github/workflows/auto_author_assign.yml
vendored
4
.github/workflows/auto_author_assign.yml
vendored
@ -6,10 +6,12 @@ on:
|
||||
types: [opened, reopened]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
assign-author:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: toshimaru/auto-author-assign@v1.6.2
|
||||
|
3
.github/workflows/binder.yml
vendored
3
.github/workflows/binder.yml
vendored
@ -3,6 +3,9 @@ on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
binder:
|
||||
runs-on: ubuntu-latest
|
||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
|
3
.github/workflows/buildutils.yml
vendored
3
.github/workflows/buildutils.yml
vendored
@ -13,6 +13,9 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
versioning:
|
||||
runs-on: ubuntu-latest
|
||||
|
2
.github/workflows/check-release.yml
vendored
2
.github/workflows/check-release.yml
vendored
@ -5,7 +5,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
|
3
.github/workflows/enforce-label.yml
vendored
3
.github/workflows/enforce-label.yml
vendored
@ -1,5 +1,8 @@
|
||||
name: Enforce PR label
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled, unlabeled, opened, edited, synchronize]
|
||||
|
6
.github/workflows/lock.yml
vendored
6
.github/workflows/lock.yml
vendored
@ -5,12 +5,14 @@ on:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v4
|
||||
with:
|
||||
|
5
.github/workflows/playwright-update.yml
vendored
5
.github/workflows/playwright-update.yml
vendored
@ -5,13 +5,14 @@ on:
|
||||
types: [created, edited]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update-snapshots:
|
||||
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update playwright snapshots') }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write # Required by actions/update-snapshots
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
2
.github/workflows/prep-release.yml
vendored
2
.github/workflows/prep-release.yml
vendored
@ -19,6 +19,8 @@ on:
|
||||
description: 'Use PRs with activity since the last stable git tag'
|
||||
required: false
|
||||
type: boolean
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
prep_release:
|
||||
runs-on: ubuntu-latest
|
||||
|
3
.github/workflows/publish-release.yml
vendored
3
.github/workflows/publish-release.yml
vendored
@ -12,6 +12,9 @@ on:
|
||||
description: 'Comma separated list of steps to skip'
|
||||
required: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish_release:
|
||||
runs-on: ubuntu-latest
|
||||
|
3
.github/workflows/ui-tests.yml
vendored
3
.github/workflows/ui-tests.yml
vendored
@ -9,6 +9,9 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
|
Loading…
Reference in New Issue
Block a user