diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 0a8f5adcb..a7d60b7a2 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -156,6 +156,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Get Artifact from Release + uses: dsaltares/fetch-gh-release-asset@master + with: + version: ${{ github.event.release.id }} + file: iac.zip + + - name: Unzip Artifact + run: unzip iac.zip + - name: install opentofu uses: opentofu/setup-opentofu@v1 with: @@ -169,7 +178,6 @@ jobs: terragrunt -v - name: Get ECR tag from Release - id: get_ecr_tag uses: dsaltares/fetch-gh-release-asset@master with: version: ${{ github.event.release.id }} @@ -177,8 +185,11 @@ jobs: target: ./tofu/environments/prod/services/backend-service - name: Unzip ECR tag - working-directory: ./tofu/environments/prod/services/backend-service - run: unzip ecr_tag.zip + id: get_ecr_tag + run: | + unzip ecr_tag.zip + output=$(cat ecr_tag.txt) + echo ecr_tag=$output >> $GITHUB_OUTPUT - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 @@ -192,7 +203,7 @@ jobs: run: | terragrunt init -upgrade terragrunt validate - terragrunt plan -var "image=$(cat steps.get_ecr_tag.outputs.*)" -out tfplan + terragrunt plan -var "image=$(steps.get_ecr_tag.outputs.ecr_tag)" -out tfplan cat tfplan # terragrunt apply tfplan # will be re-enabled once release workflow is tested