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

Commit

Permalink
🐛 push時にブランチを指定するように
Browse files Browse the repository at this point in the history
  • Loading branch information
ikura-hamu committed Jul 4, 2024
1 parent 30f04e4 commit 57fe461
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ jobs:

- name: Terraform fmt
id: fmt
run: terraform fmt -recursive .
run: terraform fmt -diff -no-color -recursive .

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

- name: Commit changes
if: steps.fmt.outputs.stdout != ''
Expand All @@ -60,7 +64,7 @@ jobs:
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit -m '[CI] terraform fmt'
git push
git push origin HEAD:${{ github.event.pull_request.head.ref }}
plan:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 57fe461

Please sign in to comment.