Skip to content

Commit

Permalink
Fix changedir (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha authored Oct 4, 2023
1 parent a16e84a commit 1d52ccd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ runs:
- name: Convert PLANFILE to JSON
if: ${{ steps.atmos-plan.outputs.changes == 'true' }}
shell: bash
working-directory: ./${{ inputs.component-path }}
run: |
cd "${{ inputs.component-path }}"
terraform show -json "${{ steps.vars.outputs.plan_file }}" > "${{ steps.vars.outputs.plan_file }}.json"
- name: Configure State AWS Credentials
Expand Down Expand Up @@ -263,14 +263,13 @@ runs:
if: ${{ steps.atmos-plan.outputs.changes == 'true' }}
id: new-plan
shell: bash
working-directory: ./${{ inputs.component-path }}
run: |
PLAN_FILE="${{ steps.vars.outputs.plan_file }}"
PLAN_FILE_STORED="${{ steps.vars.outputs.plan_file }}.stored"
NEW_PLAN_FOUND=false
if [ -f "$PLAN_FILE_STORED" ]; then
cd "${{ inputs.component-path }}"
if [ -f "$PLAN_FILE_STORED" ]; then
terraform show -json "$PLAN_FILE_STORED" > "$PLAN_FILE_STORED.json"
# sort and remove timestamp
Expand Down Expand Up @@ -379,9 +378,8 @@ runs:
- name: Publish Summary or Generate GitHub Issue Description for Drift Detection
id: summary
shell: bash
working-directory: ./${{ inputs.component-path }}
run: |
cd "${{ inputs.component-path }}"
STEP_SUMMARY_FILE="${{ steps.vars.outputs.summary_file }}"
if [[ "${{ steps.atmos-plan.outputs.no-changes }}" == "true" ]]; then
Expand Down

0 comments on commit 1d52ccd

Please sign in to comment.