Skip to content

Commit 12ab9af

Browse files
authored
[ci] Support to merge SONiC package versions change pr automatically (#7065)
Support to merge the SONiC package versions upgrade pull request automatically. #### How I did it Add the automerge tag in the pull request. 1. Sent by the author mssonicbld 2. Only contains changes in files/build/**/* 3. Only for the specified branch 202012 Merge the pull request. 1. Sent by the author mssonicbld 2. The Azure Pipelines checker complete and successful 3. The pull request contains label automerge
1 parent 7df4c0a commit 12ab9af

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/labeler.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
automerge:
2+
- all: ['files/build/versions/**']

.github/workflows/automerge.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will merge pull requests automatically
2+
#
3+
4+
name: automerge
5+
on:
6+
check_suite:
7+
types:
8+
- completed
9+
10+
jobs:
11+
automerge:
12+
if: github.event.check_suite.app.name == 'Azure Pipelines' && github.event.check_suite.conclusion == 'success'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: automerge
16+
uses: 'pascalgn/automerge-action@v0.13.1'
17+
env:
18+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
19+
MERGE_LABELS: 'automerge'
20+
MERGE_METHOD: 'squash'
21+
MERGE_FILTER_AUTHOR: 'mssonicbld'
22+
MERGE_DELETE_BRANCH: true

.github/workflows/label.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler
7+
8+
name: Labeler
9+
on:
10+
pull_request:
11+
types:
12+
- opened
13+
- reopened
14+
branches:
15+
- '202012'
16+
paths:
17+
- 'files/build/versions/**'
18+
19+
jobs:
20+
label:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/labeler@main
24+
with:
25+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)