Skip to content

Commit 045fc0e

Browse files
committed
Move secret to job level
1 parent fb7c999 commit 045fc0e

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/dev-ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ name: Development Continuous Integration
66
permissions:
77
contents: write
88

9-
env:
10-
PAYSTACK_SECRET_KEY: ${{ secrets.PAYSTACK_SECRET_KEY }}
9+
1110

1211
on:
1312
push:
@@ -20,6 +19,8 @@ jobs:
2019
name: Format, lint & test project
2120
if: github.actor != 'github-actions[bot]'
2221
runs-on: ubuntu-latest
22+
env:
23+
PAYSTACK_SECRET_KEY: ${{ secrets.PAYSTACK_SECRET_KEY }}
2324

2425
steps:
2526
- name: Checkout
@@ -35,6 +36,14 @@ jobs:
3536
run: uv run ruff format .
3637
- name: Lint with ruff
3738
run: uv run ruff check . --fix
39+
- name: Check secret
40+
run: |
41+
if [ -z "$PAYSTACK_SECRET_KEY" ]; then
42+
echo "SECRET NOT SET"
43+
exit 1
44+
else
45+
echo "SECRET IS SET"
46+
fi
3847
- name: Test package
3948
run: |
4049
uv run python -c "import os; print('key is ->',os.environ['PAYSTACK_SECRET_KEY'])"

0 commit comments

Comments
 (0)