File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 4646| pr-description-prefix | 本文の接頭語。 | | |
4747| exit-failure | 実行完了時にCIを失敗させるかどうか。 | | true |
4848| working-directory | 実行対象のディレクトリ | | |
49+ | no-verify | git commit, push時のフックを無効化する | | false |
4950
5051## 対応しているトリガー
5152* pull_request
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ inputs:
2525 description : ' 実行対象のディレクトリ'
2626 required : false
2727 default : " "
28+ no-verify :
29+ description : ' git commit, push時のフックを無効化する'
30+ required : false
31+ default : " false"
2832runs :
2933 using : " composite"
3034 steps :
4650 TOKEN : ${{inputs.github-token}}
4751 REPOSITORY : ${{github.repository}}
4852 BRANCH_NAME_PREFIX : ${{inputs.branch-name-prefix}}
53+ NO_VERIFY : ${{inputs.no-verify}}
4954 if : steps.diff.outputs.result != '' && ((github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'repository_dispatch')
5055 working-directory : ${{inputs.working-directory}}
5156 run : ${{ github.action_path }}/scripts/action/push.sh
Original file line number Diff line number Diff line change 33git config user.name " github-actions[bot]"
44EMAIL=" 41898282+github-actions[bot]@users.noreply.github.com"
55git config user.email " ${EMAIL} "
6- git commit -m " ${PR_TITLE_PREFIX} "
6+ GIT_COMMIT_COMMAND=" git commit"
7+
8+ if [ " $NO_VERIFY " = " true" ]; then
9+ GIT_COMMIT_COMMAND=" $GIT_COMMIT_COMMAND --no-verify"
10+ fi
11+
12+ GIT_COMMIT_COMMAND=" $GIT_COMMIT_COMMAND -m \" ${PR_TITLE_PREFIX} \" "
13+ eval " $GIT_COMMIT_COMMAND "
714REPO_URL=" https://"
815REPO_URL+=" ${AUTHOR} :${TOKEN} @github.com/"
916REPO_URL+=" ${REPOSITORY} .git"
1017GITHUB_HEAD=" HEAD:refs/heads/${BRANCH_NAME_PREFIX} -${HEAD_REF} "
11- git push -f " ${REPO_URL} " " ${GITHUB_HEAD} "
18+ GIT_PUSH_COMMAND=" git push"
19+
20+ if [ " $NO_VERIFY " = " true" ]; then
21+ GIT_PUSH_COMMAND=" $GIT_PUSH_COMMAND --no-verify"
22+ fi
23+
24+ GIT_PUSH_COMMAND=" $GIT_PUSH_COMMAND -f \" ${REPO_URL} \" \" ${GITHUB_HEAD} \" "
25+ eval " $GIT_PUSH_COMMAND "
You can’t perform that action at this time.
0 commit comments