forked from networkservicemesh/deployments-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 866 Bytes
/
automerge.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
name: automerge
on:
workflow_run:
types:
- completed
workflows:
- "ci"
jobs:
print-debug-info:
name: Print debug info
runs-on: ubuntu-latest
steps:
- uses: hmarr/debug-action@v2
check-mergeability:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: networkservicemesh/.github/.github/workflows/check-mergeability.yaml@main
secrets:
token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}
automerge:
needs: [check-mergeability]
if: ${{ needs.check-mergeability.outputs.pr_branch_ref != '' }}
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Automerge
run: gh pr merge ${{ github.event.workflow_run.head_branch }} --squash --delete-branch
env:
GH_TOKEN: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}