Skip to content

Commit 655f7d3

Browse files
authored
Add workflow-wide gh actions permissions (#608)
add workflow-wide permissions
1 parent da63a3c commit 655f7d3

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

.github/workflows/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ on:
55
tags:
66
- "[0-9]+.[0-9]+.[0-9]+"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
release:
1013
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1116
steps:
1217
-
1318
name: Checkout

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ on:
1212
- minor
1313
- patch
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
release:
1720
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
1823
steps:
1924
-
2025
name: Checkout

.github/workflows/stale.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ on:
44
schedule:
55
- cron: "30 1 * * *"
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
stale:
912
runs-on: ubuntu-22.04
13+
permissions:
14+
issues: write
1015
steps:
1116
- uses: actions/stale@v9
1217
with:

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
rubocop:
1316
name: Rubocop
@@ -26,6 +29,8 @@ jobs:
2629
rspec:
2730
name: Rspec ruby-${{ matrix.ruby }}-oj-${{ matrix.oj }}
2831
runs-on: ubuntu-latest
32+
permissions:
33+
contents: write
2934
needs: rubocop
3035
strategy:
3136
fail-fast: false

0 commit comments

Comments
 (0)