Skip to content

Commit 84c860f

Browse files
authored
chore: Add permissions to all workflows (#189)
1 parent 96e5158 commit 84c860f

File tree

5 files changed

+38
-23
lines changed

5 files changed

+38
-23
lines changed

.github/workflows/ci.yml

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

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
runs-on: ubuntu-latest

.github/workflows/pr_title.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- edited
88
- synchronize
99

10+
permissions:
11+
pull-requests: read
12+
1013
jobs:
1114
main:
1215
name: Validate PR title
@@ -41,7 +44,7 @@ jobs:
4144
# special "[WIP]" prefix to indicate this state. This will avoid the
4245
# validation of the PR title and the pull request checks remain pending.
4346
# Note that a second check will be reported if this is enabled.
44-
wip: true
47+
wip: false
4548
# When using "Squash and merge" on a PR with only one commit, GitHub
4649
# will suggest using that commit message instead of the PR title for the
4750
# merge commit, and it's easy to commit this by mistake. Enable this option

.github/workflows/publish.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,27 @@ name: publish
22
on:
33
push:
44
tags:
5-
- 'v*.*.*'
5+
- "v*.*.*"
6+
7+
permissions:
8+
contents: read
69

710
jobs:
8-
publish:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v4
13-
- uses: actions/setup-java@v4
14-
with:
15-
distribution: 'temurin'
16-
java-version: '18'
17-
cache: 'gradle'
18-
- name: Validate Gradle wrapper
19-
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
20-
- name: Publish package
21-
uses: gradle/gradle-build-action@093dfe9d598ec5a42246855d09b49dc76803c005
22-
with:
23-
arguments: publish
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- uses: actions/setup-java@v4
17+
with:
18+
distribution: "temurin"
19+
java-version: "18"
20+
cache: "gradle"
21+
- name: Validate Gradle wrapper
22+
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
23+
- name: Publish package
24+
uses: gradle/gradle-build-action@093dfe9d598ec5a42246855d09b49dc76803c005
25+
with:
26+
arguments: publish
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/regen.yml

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

7+
permissions:
8+
contents: read
9+
710
jobs:
811
regen:
912
timeout-minutes: 30
@@ -13,9 +16,9 @@ jobs:
1316
uses: actions/checkout@v4
1417
- uses: actions/setup-java@v4
1518
with:
16-
distribution: 'temurin'
17-
java-version: '18'
18-
cache: 'gradle'
19+
distribution: "temurin"
20+
java-version: "18"
21+
cache: "gradle"
1922
- name: Validate Gradle wrapper
2023
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
2124
- name: Generate code

.github/workflows/release_pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches:
55
- main
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
release-please:
912
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)