-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #827 from shinya/feature/build-auto-merge
自動マージの仕組みを導入
- Loading branch information
Showing
4 changed files
with
60 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Auto-merge | ||
|
||
on: | ||
workflow_run: | ||
workflows: [E2E testing for EC-CUBE] | ||
types: [completed] | ||
|
||
jobs: | ||
check-and-merge: | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.workflow_run.conclusion == 'success' | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Approve PR | ||
run: gh pr review "$PR_URL" --approve | ||
## いきなりマージするのが怖いので、一旦自動承認(↑)だけにする | ||
#- name: Enable auto-merge | ||
# run: gh pr merge --merge --auto "$PR_URL" | ||
|
||
failed: | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.workflow_run.conclusion == 'failure' | ||
steps: | ||
- name: failed | ||
# 失敗したときにデバッグ用に情報を出力しておく | ||
run: | | ||
echo 'Haven't met the conditions to merge yet' | ||
echo '${{ toJSON(github.event.workflow_run) }}' | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters