Skip to content

Commit

Permalink
ci: use context to get command env var
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Jul 25, 2024
1 parent 4b0f604 commit 0ed6af0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
- uses: aws-actions/amazon-ecr-login@v1

- id: run-with-docker-compose
run: "$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml up -d
run: {{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml up -d

- id: docker-compose-ps
run: |
sleep 30
"$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml ps
{{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml ps
curl -v http://localhost:8085/
- id: run-acceptance-tests
Expand All @@ -63,10 +63,10 @@ jobs:
- id: docker-compose-logs
if: always()
run: |
"$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml logs --tail frontend
"$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml logs --tail request-api
{{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml logs --tail frontend
{{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml logs --tail request-api
- id: stop-containers
if: always()
run: "$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml down
run: {{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml down
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:
- uses: aws-actions/amazon-ecr-login@v1

- id: run-with-docker-compose
run: "$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml up -d
run: {{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml up -d

- id: docker-compose-ps
run: |
sleep 30
"$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml ps
{{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml ps
curl -v http://localhost:8085/
- id: run-acceptance-tests
Expand All @@ -69,13 +69,13 @@ jobs:
- id: docker-compose-logs
if: always()
run: |
"$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml logs --tail frontend
"$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml logs --tail request-api
{{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml logs --tail frontend
{{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml logs --tail request-api
- id: stop-containers
if: always()
run: "$DOCKER_COMPOSE_CMD" -f docker-compose-real-backend.yml down
run: {{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml down

detect-environments:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 0ed6af0

Please sign in to comment.