diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..d92f952628 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,2 @@ +automerge: +- all: ['files/build/versions/**'] diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000000..502f5d8987 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -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 diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000000..f70194e047 --- /dev/null +++ b/.github/workflows/label.yml @@ -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 }}"