Skip to content

Commit e6dea88

Browse files
authored
ci(cd): update workflow permissions
1 parent 762bb5c commit e6dea88

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

.github/workflows/code-ql.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ on:
66
pull_request:
77
branches: [main, beta, alpha]
88

9-
permissions: read-all
9+
permissions:
10+
contents: read
1011

1112
jobs:
1213
codeql:
1314
name: Code QL
1415
runs-on: ubuntu-latest
1516
permissions:
16-
actions: read
17-
contents: read
1817
security-events: write
1918

2019
strategy:

.github/workflows/deploy.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,18 @@ on:
44
workflow_dispatch:
55

66
permissions:
7-
id-token: write
87
contents: read
98

10-
119
jobs:
1210
deploy_prod:
1311
name: Preparing Production release
1412
if: ${{ github.repository == 'sws2apps/github-gcloud-cli' && github.ref == 'refs/heads/main' }}
1513
environment:
1614
name: Prod.env
1715
runs-on: ubuntu-latest
18-
19-
strategy:
20-
matrix:
21-
node-version: [22.x]
16+
permissions:
17+
contents: write
18+
id-token: write
2219

2320
steps:
2421
- name: Checkout for release preparation
@@ -27,10 +24,12 @@ jobs:
2724
ref: main
2825
persist-credentials: false
2926

30-
- name: Semantic Release
31-
id: semantic
32-
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90
27+
- name: Setup Node.js LTS
28+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
3329
with:
34-
semantic_version: 19.0.2
30+
node-version: lts/Jod
31+
32+
- name: Run Semantic Release
33+
run: npx semantic-release
3534
env:
36-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/scorecards.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ on:
44
push:
55
branches: [main]
66

7-
permissions: read-all
7+
permissions:
8+
contents: read
89

910
jobs:
1011
scorecards:
1112
name: Scorecards Analysis
1213
runs-on: ubuntu-latest
1314
permissions:
14-
# Needed to upload the results to code-scanning dashboard.
1515
security-events: write
16-
# Used to receive a badge. (Upcoming feature)
1716
id-token: write
18-
actions: read
19-
contents: read
2017

2118
steps:
2219
- name: 'Checkout code'

0 commit comments

Comments
 (0)