From fd97887617027a6ee5df06467471385a556449a1 Mon Sep 17 00:00:00 2001 From: pyth0n1c <87383215+pyth0n1c@users.noreply.github.com> Date: Tue, 7 Sep 2021 16:40:30 -0700 Subject: [PATCH] New automerge action and conditional on actor name --- .github/workflows/auto-merge.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 96c30258b6..5a7456bfab 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -1,13 +1,17 @@ -name: auto-merge +name: automerge on: - pull_request_target: + pull_request: jobs: - auto-merge: + automerge: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: ahmadnassri/action-dependabot-auto-merge@v2 - with: - target: minor - github-token: ${{ secrets.AUTOMERGE }} + + - name: Print the name of the actor + run: | + echo "The name of the actor is [${{ github.actor }}]" + - name: automerge + uses: "pascalgn/automerge-action@v0.14.3" + if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + env: + GITHUB_TOKEN: "${{ secrets.PROTECTED_BRANCH_PUSH_TOKEN }}" \ No newline at end of file