From 8a624f6acee66319f4763a41de38d0422e440704 Mon Sep 17 00:00:00 2001 From: Mostafa Kamal Date: Tue, 2 Jul 2024 01:16:59 +0600 Subject: [PATCH] env --- .github/workflows/terraform-terragrunt.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/terraform-terragrunt.yml b/.github/workflows/terraform-terragrunt.yml index 3e57cb3..7562107 100644 --- a/.github/workflows/terraform-terragrunt.yml +++ b/.github/workflows/terraform-terragrunt.yml @@ -24,16 +24,16 @@ jobs: BRANCH_NAME=${GITHUB_REF#refs/heads/} if [[ "$BRANCH_NAME" == "main" ]]; then echo "TF_WORKSPACE=prod-project" >> $GITHUB_ENV - echo "TG_WORKDIR=./environment/prod" >> $GITHUB_ENV + echo "TG_WORKDIR=environment/prod" >> $GITHUB_ENV elif [[ "$BRANCH_NAME" == "stage" ]]; then echo "TF_WORKSPACE=stage" >> $GITHUB_ENV - echo "TG_WORKDIR=./environment/stage" >> $GITHUB_ENV + echo "TG_WORKDIR=environment/stage" >> $GITHUB_ENV elif [[ "$BRANCH_NAME" == "dev" ]]; then echo "TF_WORKSPACE=dev" >> $GITHUB_ENV - echo "TG_WORKDIR=./environment/dev" >> $GITHUB_ENV + echo "TG_WORKDIR=environment/dev" >> $GITHUB_ENV else echo "TF_WORKSPACE=default" >> $GITHUB_ENV - echo "TG_WORKDIR=./environment/default" >> $GITHUB_ENV + echo "TG_WORKDIR=environment/default" >> $GITHUB_ENV fi - name: Set up Terraform CLI @@ -57,13 +57,13 @@ jobs: - name: Terragrunt init run: | - cd ${{ env.TG_WORKDIR }} + cd ${{ github.workspace }}/$TG_WORKDIR terragrunt init --terragrunt-non-interactive echo "🔧 Terragrunt init completed!" - name: Terragrunt plan run: | - cd ${{ env.TG_WORKDIR }} + cd ${{ github.workspace }}/$TG_WORKDIR terragrunt plan --terragrunt-non-interactive echo "📝 Terragrunt plan completed!"