diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 502f5d8987d9..ee27244bfb1f 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -15,7 +15,7 @@ jobs: - name: automerge uses: 'pascalgn/automerge-action@v0.13.1' env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITHUB_TOKEN: '${{ secrets.TOKEN }}' MERGE_LABELS: 'automerge' MERGE_METHOD: 'squash' MERGE_FILTER_AUTHOR: 'mssonicbld' diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 5f8c0279b7e1..307cbd86f871 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -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 }}"