[actions] Update github actions label and automerge. (#11736) (#11909)

1. Add auto approve step when adding label to version upgrading PR.
2. Use mssonicbld TOKEN to merge version upgrading PR instead of 'github actions'
This commit is contained in:
Liu Shilong 2022-08-31 16:31:48 +08:00 committed by GitHub
parent ed68e4c97c
commit 932af450ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,13 @@ jobs:
label: label:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: approve
run: |
set -e
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
url=$(echo $GITHUB_CONTEXT | jq -r '.event.pull_request._links.html.href')
echo PR: $url
gh pr review $url --approve
- uses: actions/labeler@main - uses: actions/labeler@main
with: with:
repo-token: "${{ secrets.GITHUB_TOKEN }}" repo-token: "${{ secrets.GITHUB_TOKEN }}"