Skip to content

Commit

Permalink
update sample
Browse files Browse the repository at this point in the history
  • Loading branch information
takaishi committed Aug 30, 2024
1 parent c5ce570 commit 61c2364
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ jobs:
run: /usr/local/bin/tfclean --tfstate s3://path/to/tfstate .
- name: Check changes
id: diff-check
run: git diff --exit-code || echo "::set-output name=changes_detected::true"
run: git diff --exit-code || echo "changes_detected=true" >> $GITHUB_OUTPUT
- name: Commit changes
if: github.head_ref != '' && steps.diff-check.outputs.changes_detected == 'true'
if: steps.diff-check.outputs.changes_detected == 'true'
run: |
echo github.head_ref: ${{ github.head_ref }}
echo steps.diff-check.outputs.changes_detected: ${{ steps.diff-check.outputs.changes_detected }}
branch_name=tfclean_$(date +"%Y%m%d%H%M")
git switch -c ${branch_name}
Expand Down

0 comments on commit 61c2364

Please sign in to comment.