Skip to content

Commit 916e12d

Browse files
committed
fix(ci-cd): set minimal permissions for CI/CD pipeline
1 parent 36ae083 commit 916e12d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/ci-cd.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: CI/CD Pipeline
22

3+
permissions: {}
4+
35
on:
46
push:
57
branches: [main]
@@ -9,6 +11,8 @@ on:
911

1012
jobs:
1113
test:
14+
permissions:
15+
contents: read
1216
runs-on: ubuntu-latest
1317

1418
strategy:
@@ -66,6 +70,8 @@ jobs:
6670
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6771

6872
build-docs:
73+
permissions:
74+
contents: write
6975
runs-on: ubuntu-latest
7076
needs: test
7177
if: github.ref == 'refs/heads/main'
@@ -100,6 +106,8 @@ jobs:
100106
cname: aignostics-platform-sdk.github.io
101107

102108
release:
109+
permissions:
110+
contents: write
103111
runs-on: ubuntu-latest
104112
needs: [test, build-docs]
105113
if: github.ref == 'refs/heads/main'
@@ -112,7 +120,6 @@ jobs:
112120
uses: actions/checkout@v4
113121
with:
114122
fetch-depth: 0
115-
token: ${{ secrets.GITHUB_TOKEN }}
116123

117124
- name: Setup Node.js
118125
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)