Skip to content

Commit 06fa38b

Browse files
committed
ci: granular token permissions
1 parent 202599b commit 06fa38b

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/push.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ name: push
1111
concurrency:
1212
group: ${{ github.ref }}-${{ github.workflow }}
1313

14+
permissions: read-all
15+
1416
jobs:
1517
metadata:
1618
runs-on: ubuntu-latest
@@ -79,6 +81,10 @@ jobs:
7981

8082
runs-on: ubuntu-latest
8183

84+
permissions:
85+
contents: write
86+
packages: write
87+
8288
outputs:
8389
published: ${{ steps.release.outputs.published }}
8490
version: ${{ steps.release.outputs.release-version }}
@@ -110,6 +116,10 @@ jobs:
110116

111117
runs-on: ubuntu-latest
112118

119+
permissions:
120+
contents: read
121+
packages: write
122+
113123
steps:
114124
- uses: actions/[email protected]
115125
- uses: docker/setup-qemu-action@v2
@@ -120,7 +130,7 @@ jobs:
120130
with:
121131
registry: ghcr.io
122132
username: ${{ github.repository_owner }}
123-
password: ${{ secrets.GH_TOKEN }}
133+
password: ${{ secrets.GITHUB_TOKEN }}
124134

125135
# publish
126136
- uses: docker/build-push-action@v3
@@ -147,6 +157,10 @@ jobs:
147157

148158
runs-on: ubuntu-latest
149159

160+
permissions:
161+
contents: write
162+
packages: write
163+
150164
strategy:
151165
matrix:
152166
release: [ "v${{ needs.release.outputs.version }}" ]

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ inputs:
2020

2121
runs:
2222
using: docker
23-
image: docker://ghcr.io/ahmadnassri/action-workflow-queue:v1
23+
image: docker://ghcr.io/ahmadnassri/action-workflow-queue:1.0.0

0 commit comments

Comments
 (0)