Skip to content

Commit c728ddf

Browse files
fix: add workflow permissions (#3874)
1 parent 9ed36d8 commit c728ddf

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

.github/workflows/cache_cleanup.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
types:
55
- closed
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
cleanup:
912
runs-on: ubuntu-latest
@@ -14,14 +17,14 @@ jobs:
1417
- name: Cleanup
1518
run: |
1619
gh extension install actions/gh-actions-cache
17-
20+
1821
REPO=${{ github.repository }}
1922
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
2023
2124
echo "Fetching list of cache key"
2225
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
2326
24-
## Setting this to not fail the workflow while deleting cache keys.
27+
## Setting this to not fail the workflow while deleting cache keys.
2528
set +e
2629
echo "Deleting caches..."
2730
for cacheKey in $cacheKeysForPR
@@ -30,4 +33,4 @@ jobs:
3033
done
3134
echo "Done"
3235
env:
33-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
merge_group:
1010

11+
permissions:
12+
contents: read
13+
1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1316
cancel-in-progress: true

.github/workflows/enforce-license-compliance.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
branches: [main, master]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
enforce-license-compliance:
912
runs-on: ubuntu-latest

.github/workflows/self-hosted-release-pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
description: 'Name of version (ie 23.9.5)'
88
required: true
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
create-release-pr:
1215
name: Create PR for Release ${{ github.event.inputs.versionName }}

.github/workflows/self-hosted-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
types: [closed]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
create-release:
1114
name: Tag Release ${{ github.head_ref }} and Push Docker image to Docker Hub

.github/workflows/trigger-gazebo-preview.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Trigger gazebo preview deploy
22

33
on: pull_request
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
run:
710
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)