Skip to content

Commit

Permalink
fix: properly compute deploy target environment name
Browse files Browse the repository at this point in the history
  • Loading branch information
0-vortex committed Mar 12, 2022
1 parent 740e7f7 commit 7646d62
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Expand Up @@ -7,10 +7,16 @@ on:
- alpha
- beta

env:
DEPLOY_ENVIRONMENT: "$([[ ${{ github.ref_name }} == 'main' ]] && echo 'production' || echo ${{ github.ref_name }})"

jobs:
setup:
name: Set environment variables
runs-on: ubuntu-latest
steps:
- name: "☁️ checkout repository"
run: |
echo $([[ ${{ github.ref_name }} == 'main' ]] && echo "production" || echo ${{ github.ref_name }})
echo "DEPLOY_ENVIRONMENT=$([[ ${{ github.ref_name }} == 'main' ]] && echo "production" || echo ${{ github.ref_name }})" >> $GITHUB_ENV
test:
name: Test and lint
uses: open-sauced/open-sauced/.github/workflows/development.yml@main
Expand Down

0 comments on commit 7646d62

Please sign in to comment.