Skip to content

Commit

Permalink
use env vars and secrets same time. use deployment environments
Browse files Browse the repository at this point in the history
  • Loading branch information
solarw committed Jan 23, 2024
1 parent e98d28a commit 78e33a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release Flow

on:
release:
types: [published]
types: [prereleased, released]

jobs:
publish-packages:
Expand Down Expand Up @@ -96,6 +96,7 @@ jobs:
deploy-service-on-propel:
name: Deploy service on propel
environment: ${{ github.event.action == 'released' && 'production' || 'staging' }}
needs:
- "publish-packages"
- "publish-images"
Expand Down Expand Up @@ -145,5 +146,7 @@ jobs:
# get env vars from github actions
echo '${{ toJSON(secrets) }}' | jq -r 'to_entries|map("export \(.key)=\(.value|tojson)")|.[]' > github.vars
echo >> github.vars
echo '${{ toJSON(vars) }}' | jq -r 'to_entries|map("export \(.key)=\(.value|tojson)")|.[]' >> github.vars
source github.vars
$CMD service deploy --name ${{ vars.SERVICE_NAME }} --service-dir $SERVICE_PATH --service-ipfs-hash $IPFS_HASH --ingress-enabled true --keys ${{ vars.SERVICE_KEYS }} --timeout 320

0 comments on commit 78e33a3

Please sign in to comment.