Skip to content

Commit

Permalink
fix: try to fix github actions bug with env
Browse files Browse the repository at this point in the history
  • Loading branch information
svifty7 committed Oct 10, 2024
1 parent 021baff commit ec027a4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:

workflow_dispatch:

env:
ENVIRONMENT_NAME: ${{github.ref_name == 'main' && 'prod' || 'dev'}}

concurrency:
group: deploy-${{github.ref_name}}
cancel-in-progress: false
Expand All @@ -21,10 +18,10 @@ jobs:
name: Update env
runs-on: ubuntu-latest
env:
CONTAINER_NAME: ttg-next-api-${{env.ENVIRONMENT_NAME}}
CONTAINER_NAME: ttg-next-api-${{github.ref_name == 'main' && 'prod' || 'dev'}}
outputs:
CONTAINER_NAME: ${{env.CONTAINER_NAME}}
NETWORK_NAME: ttg-next-network-${{env.ENVIRONMENT_NAME}}
NETWORK_NAME: ttg-next-network-${{github.ref_name == 'main' && 'prod' || 'dev'}}
IMAGE_NAME: magistrus/${{env.CONTAINER_NAME}}:latest
steps:
- run: echo "env is updated"
Expand Down Expand Up @@ -76,7 +73,7 @@ jobs:
--ip ${{secrets.DOCKER_API_CONTAINER_IP}} \
--name ${{needs.env.outputs.CONTAINER_NAME}} \
-d \
-e spring.profiles.active=${{env.ENVIRONMENT_NAME}} \
-e spring.profiles.active=${{github.ref_name == 'main' && 'prod' || 'dev'}} \
-e dbhost=${{secrets.DOCKER_MYSQL_IP}} \
-e dbuser=${{secrets.DOCKER_MYSQL_USER}} \
-e dbpassword=${{secrets.DOCKER_MYSQL_PASSWORD}} \
Expand Down

0 comments on commit ec027a4

Please sign in to comment.