Skip to content

Commit

Permalink
Merge pull request #10 from bistleague-6-0/f_rey_deployment
Browse files Browse the repository at this point in the history
fix: secrets
  • Loading branch information
reyshazni authored Aug 6, 2023
2 parents 2487b2e + 3eb2d61 commit 57c5b9a
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Determine CONFIG_SECRETS based on branch
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "CONFIG_SECRETS: ${{ secrets.CONFIG_SECRETS_PRODUCTION }}" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/staging" ]]; then
echo "CONFIG_SECRETS: ${{ secrets.CONFIG_SECRETS_STAGING }}" >> $GITHUB_ENV
fi
- name: Determine CONFIG_SECRETS and SERVICE_NAME based on branch
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "CONFIG_SECRETS: ${{ secrets.CONFIG_SECRETS_PRODUCTION }}" >> $GITHUB_ENV
echo "SERVICE_NAME: $SERVICE_NAME_MASTER" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/staging" ]]; then
echo "CONFIG_SECRETS: ${{ secrets.CONFIG_SECRETS_STAGING }}" >> $GITHUB_ENV
echo "SERVICE_NAME: $SERVICE_NAME_STAGING" >> $GITHUB_ENV
fi
- name: Setup ENV
uses: nowactions/envsubst@v1
env:
CONFIG_SECRETS: ${{ env.CONFIG_SECRETS }}
with:
input: ./files/secrets/config.secrets.template
output: ./files/secrets/config.secrets.json
- name: Setup ENV
uses: nowactions/envsubst@v1
env:
CONFIG_SECRETS: ${{ env.CONFIG_SECRETS }}
with:
input: ./files/secrets/config.secrets.template
output: ./files/secrets/config.secrets.json

- name: Setup GCP
uses: google-github-actions/setup-gcloud@v0
Expand Down

0 comments on commit 57c5b9a

Please sign in to comment.