Skip to content

Commit eecd1d9

Browse files
committed
ci: add workflow permissions
1 parent 3dc8e12 commit eecd1d9

9 files changed

Lines changed: 33 additions & 21 deletions

File tree

.github/workflows/e2e-merge-reports.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Merge e2e test reports
22

3+
permissions:
4+
contents: read
5+
actions: write # Needed for actions/upload-artifact to upload the merged HTML report.
6+
37
on:
48
workflow_call:
59
inputs:

.github/workflows/e2e-shard-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Run sharded e2e tests
22

3+
permissions:
4+
contents: read
5+
actions: write # Needed to upload blob reports as artifacts.
6+
37
on:
48
workflow_call:
59
inputs:

.github/workflows/e2e.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: e2e
22

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_call:
58
secrets:

.github/workflows/pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PR
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
types: [opened, synchronize, reopened, closed]

.github/workflows/project-add.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Add issues and PRs to Sia project
22

3+
permissions:
4+
contents: read
5+
36
on:
47
issues:
58
types:

.github/workflows/release-beta.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Manually Release a Beta Tag to NPM and GitHub
22

3+
permissions:
4+
contents: write # Needed by changesets/action to create releases and update tags.
5+
36
on:
47
push:
58
branches:

.github/workflows/release-go.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name: Release Go modules
22

3+
permissions:
4+
contents: read # Read is sufficient because pushes use PAT, not GITHUB_TOKEN perms.
5+
36
concurrency: commits-to-main
47

58
on:
69
repository_dispatch:
710
types: [release-go]
8-
# Enable manual trigger
911
workflow_dispatch:
1012

1113
jobs:
@@ -40,23 +42,3 @@ jobs:
4042
git push origin main --tags
4143
# cleanup
4244
git branch -D release
43-
# Disabled in favor of Dependabot.
44-
# Leaving here in case we ever want to re-enable.
45-
# - name: Create UI PR on renterd repo
46-
# uses: peter-evans/repository-dispatch@v3
47-
# with:
48-
# token: ${{ secrets.PAT_REPOSITORY_DISPATCH }}
49-
# repository: siafoundation/renterd
50-
# event-type: update-ui
51-
# - name: Create UI PR on hostd repo
52-
# uses: peter-evans/repository-dispatch@v3
53-
# with:
54-
# token: ${{ secrets.PAT_REPOSITORY_DISPATCH }}
55-
# repository: siafoundation/hostd
56-
# event-type: update-ui
57-
# - name: Create UI PR on walletd repo
58-
# uses: peter-evans/repository-dispatch@v3
59-
# with:
60-
# token: ${{ secrets.PAT_REPOSITORY_DISPATCH }}
61-
# repository: siafoundation/walletd
62-
# event-type: update-ui

.github/workflows/release-main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Update Release PR or Release Versions and Publish
22

3+
permissions:
4+
contents: write # Required for changesets/action to commit/version and create releases.
5+
pull-requests: write # Needed to update the release PR during versioning.
6+
packages: write # Needed to push Docker images to GHCR via docker/login-action.
7+
38
on:
49
push:
510
branches:

.github/workflows/release-manual.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Release Versions and Publish
22

3+
permissions:
4+
contents: write # Required for changesets/action to publish releases and tags.
5+
pull-requests: write # Allows updating release PRs if needed.
6+
packages: write # Allows pushing Docker images to GHCR if containers are built.
7+
38
on:
49
workflow_dispatch:
510

0 commit comments

Comments
 (0)