-
Notifications
You must be signed in to change notification settings - Fork 25
48 lines (42 loc) · 2.05 KB
/
AutoMerger.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
# This workflow automatically merges pull requests under certain
# conditions in Project Mu repos.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# For more information, see:
# https://github.com/pascalgn/automerge-action
name: Auto Merge Pull Request Workflow
on:
workflow_call:
jobs:
bot_merge:
name: Merge
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
# The action cannot take multiple authors right now, so call with each author
# separately.
strategy:
matrix:
author: [ "dependabot[bot]", "uefibot" ]
steps:
- name: Auto Merge
id: auto_merge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.PROJECT_MU_BOT_TOKEN }}"
MERGE_ERROR_FAIL: "false" # Do not fail if an auto merge couldn't happen
MERGE_FILTER_AUTHOR: "${{ matrix.author }}"
MERGE_FORKS: "false" # dependabot and uefibot come from local repo branches - forks not needed
MERGE_LABELS: "!state:duplicate,!state:invalid,!state:needs-maintainer-feedback,!state:needs-submitter-info,!state:under-discussion,!state:wont-fix,!type:notes,!type:question"
MERGE_METHOD: "squash" # Default merge method squash (instead of "merge")
MERGE_REMOVE_LABELS: = "" # Do not remove any labels from a PR after merge
MERGE_RETRIES: "180" # Check if PR status checks pass up to 180 times
MERGE_RETRY_SLEEP: "60000" # Check if PR status checks are met every 60 secs (60 * 180 = check over 3 hrs)
UPDATE_LABELS: "" # Always update these PRs if needed to merge
UPDATE_METHOD: "rebase" # Default PR update method rebase (instead of "merge")
UPDATE_RETRIES: "120" # Check if an update is needed up to 120 times
UPDATE_RETRY_SLEEP: "60000" # Check if an update is needed every 30 secs (60 * 120 = check over 2 hrs)