Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
🐛 difが無い時はいろいろスキップする
Browse files Browse the repository at this point in the history
  • Loading branch information
ikura-hamu committed Jul 4, 2024
1 parent 4bcc53d commit b883841
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ jobs:
id: fmt
run: terraform fmt -diff -no-color -recursive .

- if: steps.fmt.outputs.stdout == ''
run: exit 0

- name: Exit if trigger is workflow_dispatch and fmt failed # workflow_dispatchからの実行ではコミットしない
if: github.event_name == 'workflow_dispatch'
run: exit 1
run: test ${{ steps.fmt.outputs.stdout }} == ''

- name: Commit changes
if: steps.fmt.outputs.stdout != ''
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
Expand All @@ -77,9 +75,11 @@ jobs:
git push origin HEAD:${{ github.event.pull_request.head.ref }}
- name: Call plan workflow
if: steps.fmt.outputs.stdout != ''
uses: ./.github/workflows/plan.yml

- run: exit 1
- if: steps.fmt.outputs.stdout != ''
run: exit 1

plan:
needs: fmt
Expand Down

0 comments on commit b883841

Please sign in to comment.