Skip to content

Commit 3fb0cc2

Browse files
committed
ci: validate required secrets before functions deploy
1 parent 4e58d5b commit 3fb0cc2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/deploy-functions.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ jobs:
3131
- name: Install Functions Dependencies
3232
run: npm --prefix functions ci
3333

34+
- name: Validate Required Secrets
35+
run: |
36+
if [ -z "${{ secrets.FIREBASE_TOKEN }}" ]; then
37+
echo "::error::Missing required GitHub secret: FIREBASE_TOKEN"
38+
exit 1
39+
fi
40+
41+
if [ -z "${{ secrets.REACT_APP_OPENAI_API_KEY }}" ]; then
42+
echo "::error::Missing required GitHub secret: REACT_APP_OPENAI_API_KEY"
43+
exit 1
44+
fi
45+
3446
- name: Sync OPENAI secret to Firebase
3547
run: |
3648
echo "${{ secrets.REACT_APP_OPENAI_API_KEY }}" | firebase functions:secrets:set OPENAI_API_KEY \

0 commit comments

Comments
 (0)