-
Notifications
You must be signed in to change notification settings - Fork 21
61 lines (57 loc) · 1.94 KB
/
automerge.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: automerge
on:
pull_request:
types:
- labeled
check_suite:
types:
- completed
status: {}
jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.event.label.name == 'automerge' && github.event.sender.login == 'broadbot'
steps:
- uses: "hmarr/auto-approve-action@v3"
with:
review-message: "This PR was automatically approved"
automerge:
runs-on: ubuntu-latest
needs: auto-approve
steps:
- name: automerge
uses: "broadinstitute/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_METHOD: squash
MERGE_FORKS: false
MERGE_RETRIES: 180 # Retry for 3 hours
MERGE_RETRY_SLEEP: 60000 # 60 seconds
UPDATE_METHOD: rebase
UPDATE_RETRIES: 180 # Retry for 3 hours
UPDATE_RETRY_SLEEP: 60000 # 60 seconds
MERGE_REQUIRED_APPROVALS: 0
MERGE_ERROR_FAIL: true
init-github-context:
runs-on: ubuntu-latest
needs: auto-approve
outputs:
notify-failure-channel: ${{ steps.prepare-outputs.outputs.notify-failure-channel }}
steps:
- name: Match the PR to the corresponding team's slack notification channel
id: prepare-outputs
run: |
if ${{ contains(github.event.pull_request.title, 'AN-') }}; then
echo 'notify-failure-channel=dsp-analysis-non-prod-alerts' >> $GITHUB_OUTPUT
else ${{ contains(github.event.pull_request.title, 'CORE-') }};
echo 'notify-failure-channel=dsp-core-services' >> $GITHUB_OUTPUT
fi
report-workflow:
uses: broadinstitute/sherlock/.github/workflows/client-report-workflow.yaml@main
needs: [ automerge, init-github-context ]
with:
notify-slack-channels-upon-workflow-failure: ${{ needs.init-github-context.outputs.notify-failure-channel }}
permissions:
id-token: 'write'