From 0ed6af011f2e7b8cba1707ae8efb234cb121dbd3 Mon Sep 17 00:00:00 2001 From: Roland Sadowski Date: Thu, 25 Jul 2024 14:50:44 +0100 Subject: [PATCH] ci: use context to get command env var --- .github/workflows/deploy-to-dev.yml | 10 +++++----- .github/workflows/deploy.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-to-dev.yml b/.github/workflows/deploy-to-dev.yml index e56ba891..f67aa611 100644 --- a/.github/workflows/deploy-to-dev.yml +++ b/.github/workflows/deploy-to-dev.yml @@ -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 @@ -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 \ No newline at end of file + run: {{ env.DOCKER_COMPOSE_CMD }} -f docker-compose-real-backend.yml down \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2eb9093d..d8f500c9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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