Skip to content

Commit 373a95f

Browse files
committed
More github actions permissions work
1 parent d0a5e1b commit 373a95f

12 files changed

+32
-13
lines changed

.github/workflows/auto-update-otel-sdk.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- cron: "46 * * * *"
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
check-versions:
1114
runs-on: ubuntu-latest
@@ -44,7 +47,7 @@ jobs:
4447
4548
update-otel-sdk:
4649
permissions:
47-
contents: write # for Git to git push
50+
contents: write # for git push to PR branch
4851
runs-on: ubuntu-latest
4952
if: |
5053
needs.check-versions.outputs.current-version != needs.check-versions.outputs.latest-version &&

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
backport:
1414
permissions:
15-
contents: write # for Git to git push
15+
contents: write # for git push to PR branch
1616
runs-on: ubuntu-latest
1717
steps:
1818
- run: |

.github/workflows/issue-management-feedback-label.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ on:
44
issue_comment:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
issue_comment:
12+
permissions:
13+
contents: read
14+
issues: write
915
if: >
1016
contains(github.event.issue.labels.*.name, 'needs author feedback') &&
1117
github.event.comment.user.login == github.event.issue.user.login

.github/workflows/label.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ permissions:
66

77
jobs:
88
label:
9-
109
runs-on: ubuntu-latest
1110
permissions:
1211
contents: read
1312
pull-requests: write
14-
1513
steps:
1614
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
1715
with:

.github/workflows/overhead-benchmark-daily.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
run-overhead-tests:
1313
permissions:
14-
contents: write # for writing to the gh-pages branch
14+
contents: write # for git push to gh-pages branch
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/owasp-dependency-check-daily.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ permissions:
1414
jobs:
1515
analyze:
1616
runs-on: ubuntu-latest
17-
1817
steps:
1918
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2019

.github/workflows/prepare-patch-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions:
88
jobs:
99
prepare-patch-release:
1010
permissions:
11-
contents: write # for Git to git push
11+
contents: write # for git push to PR branch
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/prepare-release-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
2626
create-pull-request-against-release-branch:
2727
permissions:
28-
contents: write # for Git to git push
28+
contents: write # for git push to PR branch
2929
runs-on: ubuntu-latest
3030
needs:
3131
- prereqs
@@ -80,7 +80,7 @@ jobs:
8080
8181
create-pull-request-against-main:
8282
permissions:
83-
contents: write # for Git to git push
83+
contents: write # for git push to PR branch
8484
runs-on: ubuntu-latest
8585
needs:
8686
- prereqs

.github/workflows/release-update-cloudfoundry-index.yml

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

1111
permissions:
12-
contents: write
13-
pull-requests: write
12+
contents: read
1413

1514
jobs:
16-
1715
update-cloudfoundry-index-yml:
16+
permissions:
17+
contents: write # for git push to PR branch
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Release
22
on:
33
workflow_dispatch:
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
required-jobs:
710
uses: ./.github/workflows/build-common.yml
@@ -16,6 +19,8 @@ jobs:
1619
# and this is not a reason to hold up the release
1720

1821
release:
22+
permissions:
23+
contents: write # for creating the release
1924
runs-on: ubuntu-latest
2025
needs:
2126
- required-jobs
@@ -181,6 +186,8 @@ jobs:
181186
echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT
182187
183188
merge-change-log-to-main:
189+
permissions:
190+
contents: write # for git push to PR branch
184191
runs-on: ubuntu-latest
185192
needs:
186193
- release

0 commit comments

Comments
 (0)