Skip to content

Commit 70494f4

Browse files
committed
ci: use permissions
1 parent c9e9bff commit 70494f4

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

.github/workflows/actionlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ jobs:
99
actionlint:
1010
name: Run actionlint
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
1214
steps:
1315
- uses: it-at-m/lhm_actions/action-templates/actions/action-actionlint@12966547963631f8429d42bab860485b413003c2 # v1.0.22

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ on:
66
jobs:
77
dependency-review:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
911
steps:
1012
- uses: it-at-m/lhm_actions/action-templates/actions/action-dependency-review@12966547963631f8429d42bab860485b413003c2 # v1.0.22

.github/workflows/deploy-docs.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ on:
1313
- "docs/**"
1414
- ".github/workflows/deploy-docs.yml"
1515

16-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17-
permissions:
18-
contents: read
19-
pages: write
20-
id-token: write
21-
2216
jobs:
2317
deploy-docs:
2418
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
2523
steps:
2624
- id: build_docs
2725
uses: it-at-m/lhm_actions/action-templates/actions/action-build-docs@12966547963631f8429d42bab860485b413003c2 # v1.0.22

.github/workflows/dockercompose-healthcheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
docker-compose-healthcheck:
99
name: Run docker compose healthcheck
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
1113
steps:
1214
- uses: it-at-m/lhm_actions/action-templates/actions/action-dockercompose-healthcheck@12966547963631f8429d42bab860485b413003c2 # v1.0.22
1315
with:

.github/workflows/maven-node-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
1215
env:
1316
TZ: Europe/Berlin # timezone
1417
strategy:

.github/workflows/maven-release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ on:
2222
jobs:
2323
release-maven:
2424
runs-on: ubuntu-latest
25+
permissions:
26+
contents: write
27+
pull-requests: write
2528
outputs:
2629
MVN_ARTIFACT_ID: ${{ steps.maven-release-step.outputs.MVN_ARTIFACT_ID }}
2730
ARTIFACT_NAME: ${{ steps.maven-release-step.outputs.artifact-name }}
@@ -43,6 +46,8 @@ jobs:
4346
build-image:
4447
runs-on: ubuntu-latest
4548
needs: release-maven
49+
permissions:
50+
packages: write
4651
steps:
4752
- uses: it-at-m/lhm_actions/action-templates/actions/action-build-image@12966547963631f8429d42bab860485b413003c2 # v1.0.22
4853
with:
@@ -58,6 +63,8 @@ jobs:
5863
create-github-release:
5964
needs: release-maven
6065
runs-on: ubuntu-latest
66+
permissions:
67+
contents: write
6168
steps:
6269
- name: Download a single artifact
6370
uses: it-at-m/lhm_actions/action-templates/actions/action-create-github-release@12966547963631f8429d42bab860485b413003c2 # v1.0.22

.github/workflows/npm-release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ jobs:
5353
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Centralized token in it-at-m GitHub organization
5454

5555
build-image:
56-
runs-on: ubuntu-latest
5756
needs: release
57+
runs-on: ubuntu-latest
58+
permissions:
59+
packages: write
5860
steps:
5961
- uses: it-at-m/lhm_actions/action-templates/actions/action-build-image@12966547963631f8429d42bab860485b413003c2 # v1.0.22
6062
with:
@@ -66,9 +68,12 @@ jobs:
6668
image-tags: |
6769
type=semver,pattern={{version}},value=${{ needs.release.outputs.ARTIFACT_VERSION }}
6870
type=raw,value=latest
71+
6972
create-github-release:
7073
needs: release
7174
runs-on: ubuntu-latest
75+
permissions:
76+
contents: write
7277
steps:
7378
- name: Create GitHub Release
7479
uses: it-at-m/lhm_actions/action-templates/actions/action-create-github-release@12966547963631f8429d42bab860485b413003c2 # v1.0.22

0 commit comments

Comments
 (0)