Skip to content

Commit 1cb272f

Browse files
[MISC] Add appropriate workflow permissions (#207)
1 parent 7c4c927 commit 1cb272f

5 files changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
schedule:
1818
- cron: "53 0 * * *" # Daily at 00:53 UTC
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
lint:
2225
name: Lint
@@ -45,6 +48,9 @@ jobs:
4548
build:
4649
name: Build charm
4750
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v48.1.1
51+
permissions:
52+
actions: read # Needed for GitHub API call to get workflow version
53+
contents: read
4854

4955
integration-test:
5056
strategy:

.github/workflows/integration-gpu.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
default: "amd64"
1212
required: true
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
start-runner:
1619
name: Start self-hosted EC2 runner

.github/workflows/refresh-tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ name: Inplace refresh tests
66
on:
77
workflow_call:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test-refresh:
1114
strategy:

.github/workflows/release.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- 3.4/edge
1010
- 3.5/edge
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316

1417
release-checks:
@@ -63,7 +66,8 @@ jobs:
6366
with:
6467
track: ${{ needs.release-checks.outputs.track }}
6568
permissions:
66-
contents: write # Needed to create git tag
69+
actions: read # Needed for GitHub API call to get workflow version
70+
contents: write # Needed to create git tags
6771

6872
ci-tests:
6973
uses: ./.github/workflows/ci.yaml
@@ -83,4 +87,5 @@ jobs:
8387
secrets:
8488
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
8589
permissions:
86-
contents: write # Needed to create git tags
90+
actions: read # Needed for GitHub API call to get workflow version
91+
contents: write # Needed to create git tags

.github/workflows/tiobe_scan.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- cron: "0 2 * * 6" # Every Saturday 2:00 AM UTC
1010
workflow_dispatch:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
tiobe-scan:
1417
name: Tiobe scan

0 commit comments

Comments
 (0)