Skip to content

Commit

Permalink
Update terraform-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
David Arnold authored and GitHub committed Mar 22, 2025
1 parent 32dae61 commit 04c037c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/terraform-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
- name: Check for file changes
id: check_changes
run: |
git diff --exit-code || echo "changes_detected=true" >> $GITHUB_ENV
if [ -n "$(git status --porcelain)" ]; then
echo "changes_detected=true" >> $GITHUB_ENV
else
echo "changes_detected=false" >> $GITHUB_ENV
fi
- name: Commit and push changes
if: env.changes_detected == 'true'
Expand All @@ -49,7 +53,7 @@ jobs:
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "chore: format terraform files"
git push origin HEAD:${{ github.event.pull_request.head.ref }}
git push origin "HEAD:${{ github.event.pull_request.head.ref }}"
- name: Terraform Init
id: init
Expand Down

0 comments on commit 04c037c

Please sign in to comment.