Skip to content

Commit 9eef1fc

Browse files
Merge remote-tracking branch 'origin/workflows-fix' into staging
2 parents 94235ab + 0a96786 commit 9eef1fc

2 files changed

Lines changed: 22 additions & 18 deletions

File tree

.github/workflows/continuos_deployment_production.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ jobs:
7171
unset AWS_PROFILE
7272
terraform plan -out planfile
7373
74-
# Upload the plan as an artifact
75-
- name: Upload Terraform plan
76-
uses: actions/upload-artifact@v4
77-
with:
78-
name: terraform-${{ env.ENVIRONMENT }}-plan
79-
path: terraform/${{ env.ENVIRONMENT }}/planfile
80-
if-no-files-found: 'warn'
81-
retention-days: 1
82-
overwrite: true
74+
# ---------------------
75+
- name: Terraform apply
76+
run: |
77+
cd terraform
78+
cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
79+
. ./.envrc.good
80+
cd ${{ env.ENVIRONMENT }}
81+
cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
82+
. ./.envrc.good
83+
unset AWS_PROFILE
84+
terraform apply -input=false planfile

.github/workflows/continuos_deployment_staging.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ jobs:
7171
unset AWS_PROFILE
7272
terraform plan -out planfile
7373
74-
# Upload the plan as an artifact
75-
- name: Upload Terraform plan
76-
uses: actions/upload-artifact@v4
77-
with:
78-
name: terraform-${{ env.ENVIRONMENT }}-plan
79-
path: terraform/${{ env.ENVIRONMENT }}/planfile
80-
if-no-files-found: 'warn'
81-
retention-days: 1
82-
overwrite: true
74+
# ---------------------
75+
- name: Terraform apply
76+
run: |
77+
cd terraform
78+
cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
79+
. ./.envrc.good
80+
cd ${{ env.ENVIRONMENT }}
81+
cat .envrc | grep -vE '^(dotenv_if_exists|source_env)' > .envrc.good
82+
. ./.envrc.good
83+
unset AWS_PROFILE
84+
terraform apply -input=false planfile

0 commit comments

Comments
 (0)