Add explicit permissions to GitHub Actions by QuLogic · Pull Request #24579 · matplotlib/matplotlib · GitHub
Skip to content
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
2 changes: 2 additions & 0 deletions .circleci/config.yml
4 changes: 4 additions & 0 deletions .github/workflows/cibuildsdist.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build CI sdist and wheel

on:
Expand All @@ -17,6 +18,9 @@ on:
- reopened
- labeled

permissions:
contents: read

jobs:
build_sdist:
if: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build CI wheels

on:
Expand All @@ -17,6 +18,9 @@ on:
- reopened
- labeled

permissions:
contents: read

jobs:
build_wheels:
if: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
on: [status]
permissions:
statuses: write
jobs:
circleci_artifacts_redirector_job:
runs-on: ubuntu-latest
if: "${{ github.event.context == 'ci/circleci: docs-python38' }}"
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
Expand All @@ -11,3 +15,7 @@ jobs:
artifact-path: 0/doc/build/html/index.html
circleci-jobs: docs-python38
job-title: View the built docs
- name: Check the URL
if: github.event.status != 'pending'
run: |
curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA
4 changes: 4 additions & 0 deletions .github/workflows/clean_pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
name: PR cleanliness
on: [pull_request]

permissions:
contents: read

jobs:
pr_clean:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/conflictcheck.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: "Maintenance"
on:
# So that PRs touching the same files as the push are updated
Expand All @@ -8,6 +9,9 @@ on:
pull_request_target:
types: [synchronize]

permissions:
pull-requests: write

jobs:
main:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nightlies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
# Run on demand with workflow dispatch
workflow_dispatch:

permissions:
actions: read

jobs:
upload_nightly_wheels:
name: Upload nightly wheels to Anaconda Cloud
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr_welcome.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
name: PR Greetings

on: [pull_request_target]

permissions:
pull-requests: write

jobs:
greeting:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
name: Linting
on: [pull_request]

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

jobs:
flake8:
name: flake8
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/tests.yml