Skip to content

Commit

Permalink
fix: export TARGET_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
rochecompaan committed Oct 1, 2024
1 parent f2f89fe commit c1a1caa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion {{cookiecutter.project_slug}}/.github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ jobs:
run: |
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "BRANCH_NAME=$(echo ${{ '{{ github.ref }}' }} | sed s,refs/heads/,, | sed s,/,-,g)" >> $GITHUB_ENV
echo "TARGET_ENV=$(if [ "$BRANCH_NAME" = "main" ]; then echo "prod"; else echo "sandbox"; fi)" >> $GITHUB_ENV
export TARGET_ENV=$(if [ "$BRANCH_NAME" = "main" ]; then echo "prod"; else echo "sandbox"; fi)
echo "TARGET_ENV=$TARGET_ENV" >> $GITHUB_ENV
echo "ECR_REPO_BACKEND=${{ '{{ env.AWS_ACCOUNT_ID }}' }}.dkr.ecr.${{ '{{ env.AWS_REGION }}' }}.amazonaws.com/{{ cookiecutter.project_dash }}-$TARGET_ENV-backend" >> $GITHUB_ENV
- name: Build and push backend image
Expand Down

0 comments on commit c1a1caa

Please sign in to comment.