mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-21 22:15:38 +00:00
auto close pr if check fails
This commit is contained in:
parent
c9aa20c703
commit
d84be966fc
16
.github/workflows/update.yml
vendored
16
.github/workflows/update.yml
vendored
@ -33,6 +33,20 @@ jobs:
|
||||
- name: Check the Flake
|
||||
run: nix flake check
|
||||
- name: Enable Pull Request Automerge
|
||||
run: gh pr merge --rebase --auto ${{ steps.update.outputs.pull-request-number }}
|
||||
if: success()
|
||||
run: |
|
||||
gh pr merge \
|
||||
--rebase \
|
||||
--auto \
|
||||
${{ steps.update.outputs.pull-request-number }}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
- name: Close Pull Request If Failed
|
||||
if: failure()
|
||||
run: |
|
||||
gh pr close \
|
||||
--comment "Auto-closing pull request" \
|
||||
--delete-branch \
|
||||
${{ steps.update.outputs.pull-request-number }}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
Loading…
Reference in New Issue
Block a user