Skip to content

Commit 3a5a42f

Browse files
authored
chore: update workflow permissions (#15349)
1 parent 065263a commit 3a5a42f

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
permissions:
12-
actions: none
13-
checks: none
1412
contents: read
15-
deployments: none
16-
issues: none
17-
packages: write
18-
pull-requests: none
19-
repository-projects: none
20-
security-events: none
21-
statuses: none
2213

2314
# Cancel in-progress runs for pull requests when developers push
2415
# additional changes
@@ -821,6 +812,8 @@ jobs:
821812
needs: changes
822813
if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
823814
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
815+
permissions:
816+
packages: write # Needed to push images to ghcr.io
824817
env:
825818
DOCKER_CLI_EXPERIMENTAL: "enabled"
826819
outputs:

.github/workflows/contrib.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
# For jobs that don't run on draft PRs.
1717
- ready_for_review
1818

19+
permissions:
20+
contents: read
21+
1922
# Only run one instance per PR to ensure in-order execution.
2023
concurrency: pr-${{ github.ref }}
2124

.github/workflows/pr-cleanup.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
description: "PR number"
99
required: true
1010

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

0 commit comments

Comments
 (0)