From b88384115be530eb05e111c324b86cf130147a48 Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Fri, 5 Jul 2024 00:27:33 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20dif=E3=81=8C=E7=84=A1=E3=81=84=E6=99=82?= =?UTF-8?q?=E3=81=AF=E3=81=84=E3=82=8D=E3=81=84=E3=82=8D=E3=82=B9=E3=82=AD?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/plan.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/plan.yml b/.github/workflows/plan.yml index bfa09f3..714e2f6 100644 --- a/.github/workflows/plan.yml +++ b/.github/workflows/plan.yml @@ -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 @@ -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