mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-09 18:11:48 +08:00
ci: Auto-merge auto-generated PR
This commit is contained in:
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -181,12 +181,28 @@ jobs:
|
||||
- id: diff
|
||||
run: tools/ci/manifest.sh
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
|
||||
- uses: peter-evans/create-pull-request@v5
|
||||
- name: Create PR
|
||||
id: create-pull-request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
title: Update manifest
|
||||
body: |
|
||||
Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
|
||||
Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request).
|
||||
|
||||
This will be auto-merged when CI has passed because this is an auto-generated PR in a defined format and is usually considered no additional review is required.
|
||||
branch: update-manifest
|
||||
token: ${{ secrets.CREATE_PR_TOKEN }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
|
||||
- name: Enable auto-merge for auto-generated PR
|
||||
run: gh pr merge --rebase --auto "${PR_NUMBER:?}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.CREATE_PR_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && steps.create-pull-request.outputs.pull-request-operation == 'created'
|
||||
- name: Auto approve for auto-generated PR
|
||||
run: gh pr review --approve "${PR_NUMBER:?}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && steps.create-pull-request.outputs.pull-request-operation == 'created'
|
||||
- run: git add -N . && git diff --exit-code
|
||||
|
||||
Reference in New Issue
Block a user