mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-09 14:20:29 +00: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
|
- id: diff
|
||||||
run: tools/ci/manifest.sh
|
run: tools/ci/manifest.sh
|
||||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
|
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:
|
with:
|
||||||
title: Update manifest
|
title: Update manifest
|
||||||
body: |
|
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
|
branch: update-manifest
|
||||||
token: ${{ secrets.CREATE_PR_TOKEN }}
|
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'
|
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
|
- run: git add -N . && git diff --exit-code
|
||||||
|
|||||||
Reference in New Issue
Block a user