Skip to content

Commit

Permalink
[ci] Support to merge SONiC package versions change pr automatically (s…
Browse files Browse the repository at this point in the history
…onic-net#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
  • Loading branch information
xumia authored and daall committed Apr 13, 2021
1 parent 230e78b commit 4d9f6e6
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
automerge:
- all: ['files/build/versions/**']
22 changes: 22 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will merge pull requests automatically
#

name: automerge
on:
check_suite:
types:
- completed

jobs:
automerge:
if: github.event.check_suite.app.name == 'Azure Pipelines' && github.event.check_suite.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: automerge
uses: 'pascalgn/automerge-action@v0.13.1'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_LABELS: 'automerge'
MERGE_METHOD: 'squash'
MERGE_FILTER_AUTHOR: 'mssonicbld'
MERGE_DELETE_BRANCH: true
25 changes: 25 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on:
pull_request:
types:
- opened
- reopened
branches:
- '202012'
paths:
- 'files/build/versions/**'

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 4d9f6e6

Please sign in to comment.