-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 904 Bytes
/
Copy pathpreflight.yml
File metadata and controls
39 lines (31 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: CI/CD Preflight
on:
push:
branches:
- main
workflow_dispatch:
permissions: {}
jobs:
verify-secrets:
name: Verify required secrets
runs-on: ubuntu-latest
steps:
- name: Validate release and publish secrets
env:
RELEASE_DEPLOY_KEY: ${{ secrets.RELEASE_DEPLOY_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
missing=0
if [ -z "$RELEASE_DEPLOY_KEY" ]; then
echo "Missing required secret: RELEASE_DEPLOY_KEY"
missing=1
fi
if [ -z "$NPM_TOKEN" ]; then
echo "Missing required secret: NPM_TOKEN"
missing=1
fi
if [ "$missing" -ne 0 ]; then
echo "Preflight failed: required CI/CD secrets are missing."
exit 1
fi
echo "Preflight passed: required CI/CD secrets are configured."