Skip to content

Commit def6865

Browse files
authored
Merge pull request #1293 from turrisxyz/setup-permissions
chore: Set permissions for GitHub actions
2 parents 009ec50 + 3a2c8dd commit def6865

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

.github/workflows/build_test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
on: [push, pull_request]
22
name: Build Test
3+
permissions:
4+
contents: read
5+
36
jobs:
47
build_test_v3:
58
strategy:

.github/workflows/labeler.yml

+6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ name: "Pull Request Labeler"
22
on:
33
- pull_request_target
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
triage:
10+
permissions:
11+
contents: read # for actions/labeler to determine modified files
12+
pull-requests: write # for actions/labeler to add labels to PRs
713
runs-on: ubuntu-latest
814
steps:
915
- uses: actions/labeler@v4

.github/workflows/lint.yml

+6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ on:
44
push:
55
pull_request:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
golangci:
12+
permissions:
13+
contents: read # for actions/checkout to fetch code
14+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
915
name: lint
1016
runs-on: ubuntu-latest
1117
steps:

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
- cron: '0 1 1 * *' # UTC 01:00 on the first day of the Month
44

55
name: Release
6+
permissions:
7+
contents: read
8+
69
jobs:
710
release:
811
runs-on: ubuntu-latest

.github/workflows/shellcheck.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
on: [push, pull_request]
22
name: Shellcheck
3+
permissions:
4+
contents: read
5+
36
jobs:
47
shellcheck:
58
name: Shellcheck

.github/workflows/test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
on: [push, pull_request]
22
name: Test
3+
permissions:
4+
contents: read
5+
36
jobs:
47
test_v3_module:
58
strategy:

0 commit comments

Comments
 (0)