Skip to content

Commit

Permalink
[actions] Update github actions label and automerge. (sonic-net#11736)
Browse files Browse the repository at this point in the history
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'
  • Loading branch information
liushilongbuaa committed Aug 31, 2022
1 parent 0adfd72 commit e42eba3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: automerge
uses: 'pascalgn/[email protected]'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GITHUB_TOKEN: '${{ secrets.TOKEN }}'
MERGE_LABELS: 'automerge'
MERGE_METHOD: 'squash'
MERGE_FILTER_AUTHOR: 'mssonicbld'
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
label:
runs-on: ubuntu-latest
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
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit e42eba3

Please sign in to comment.