Skip to content

Commit dc901a7

Browse files
authored
Harden CI workflows
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 3873152 commit dc901a7

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/.kodiak.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ strip_html_comments = true # default: false
1515
always = true # default: false
1616

1717
[approve]
18-
auto_approve_usernames = ["1gtm", "tamalsaha"]
18+
auto_approve_usernames = ["tamalsaha", "1gtm", "1gtm-app[bot]"]

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
runs-on: ubuntu-24.04
1919

2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2222

2323
- name: Use Node.js 22.x
24-
uses: actions/setup-node@v4
24+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2525
with:
26-
node-version: 22.x
26+
node-version: '22'
2727

2828
- name: Build
2929
env:

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ jobs:
1313
build:
1414
name: Build
1515
runs-on: ubuntu-24.04
16+
permissions:
17+
contents: write
1618
steps:
17-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
20+
with:
21+
fetch-depth: 0
1822

1923
- name: Use Node.js
20-
uses: actions/setup-node@v4
24+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2125
with:
22-
node-version: 22.x
26+
node-version: '22'
2327

2428
- name: Install Firebase CLI
2529
run: |
@@ -31,8 +35,10 @@ jobs:
3135
3236
- name: Deploy
3337
env:
34-
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
38+
FIREBASE_SERVICE_ACCOUNT_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROD }}
3539
run: |
40+
printf '%s' "$FIREBASE_SERVICE_ACCOUNT_KEY" > "$RUNNER_TEMP/firebase-key.json"
41+
export GOOGLE_APPLICATION_CREDENTIALS="$RUNNER_TEMP/firebase-key.json"
3642
npm run build
3743
npm run deploy
3844

0 commit comments

Comments
 (0)