Skip to content

Commit

Permalink
Addressing feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jamengual committed Nov 1, 2024
1 parent e1ffe38 commit 7851d84
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ components:
terraform-version: 1.5.2
infracost-enabled: false
artifact-storage:
plan-repository-type: "dynamo"
region: us-east-2
bucket: cptest-core-ue2-auto-gitops
table: cptest-core-ue2-auto-gitops-plan-storage
Expand Down
15 changes: 13 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,24 @@ runs:
echo "step_summary_file=${STEP_SUMMARY_FILE}" >> $GITHUB_OUTPUT
echo "issue_file=${ISSUE_SUMMARY_FILE}" >> $GITHUB_OUTPUT
- name: Cache .terraform
id: cache
uses: actions/cache@v4
if: ${{ fromJson(steps.component.outputs.settings).enabled }}
with:
path: |
./${{ steps.vars.outputs.component_path }}/.terraform
key: ${{ steps.vars.outputs.cache-key }}

- name: Atmos Terraform Plan
if: ${{ fromJson(steps.atmos-settings.outputs.settings).enabled }}
id: atmos-plan
shell: bash
run: |
set +e
# Remove the environment file from the cache to avoid conflicts with workspace select
rm -f ./${{ steps.vars.outputs.component_path }}/.terraform/environment
TERRAFORM_OUTPUT_FILE="./terraform-${GITHUB_RUN_ID}-output.txt"
Expand Down Expand Up @@ -401,7 +413,7 @@ runs:
shell: bash
run: |
echo "Running Infracost diff"
infracost diff \
infracost diff \
--path="${{ steps.vars.outputs.plan_file }}.json" \
--format=diff \
--project-name "${{ inputs.stack }}-${{ inputs.component }}" \
Expand Down Expand Up @@ -466,7 +478,6 @@ runs:
if [ -f ${STEP_SUMMARY_FILE} ]; then
echo "${STEP_SUMMARY_FILE} found"
cat ${STEP_SUMMARY_FILE}
STEP_SUMMARY=$(cat ${STEP_SUMMARY_FILE} | jq -Rs .)
echo "result=${STEP_SUMMARY}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 7851d84

Please sign in to comment.