Skip to content

Commit cf8d535

Browse files
authored
Set permissions for GitHub Actions (#10607)
1 parent b9736f2 commit cf8d535

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

.github/workflows/builddoc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build document
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710
runs-on: ubuntu-latest

.github/workflows/coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Coverage
22

33
on: [push]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
coverage:
710
runs-on: ubuntu-latest

.github/workflows/create-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ on:
55
tags:
66
- "v*.*.*"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
create-release:
13+
permissions:
14+
contents: write # for softprops/action-gh-release to create GitHub release
1015
runs-on: ubuntu-latest
1116
steps:
1217
- name: Checkout

.github/workflows/docutils-latest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: "0 0 * * SUN"
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
test:
1013
if: github.repository_owner == 'sphinx-doc'

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Lint source code
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710
runs-on: ubuntu-latest

.github/workflows/transifex.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: "0 0 * * SUN"
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
push:
1013
if: github.repository_owner == 'sphinx-doc'
@@ -30,6 +33,9 @@ jobs:
3033
TX_TOKEN: ${{ secrets.TX_TOKEN }}
3134

3235
pull:
36+
permissions:
37+
contents: write # for peter-evans/create-pull-request to create branch
38+
pull-requests: write # for peter-evans/create-pull-request to create a PR
3339
if: github.repository_owner == 'sphinx-doc'
3440
runs-on: ubuntu-latest
3541

0 commit comments

Comments
 (0)