diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index a8af4e7f79..a54abe7f27 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -4,10 +4,17 @@ on: pull_request jobs: dependabot: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} + # TODO: remove head_ref condition + if: ${{ github.actor == 'dependabot[bot]' || github.head_ref == 'dependabot/cargo/main/clap-4.4.4' }} steps: + - name: Dump GitHub context (temporary) # TODO: remove this step + run: echo "$GITHUB_CONTEXT" + env: + GITHUB_CONTEXT: ${{ toJson(github) }} - name: Approve & enable auto-merge for Dependabot PRs - run: gh pr review --approve -b "Auto-approving dependabot PR." "$PR_URL" && gh pr merge --auto --squash "$PR_URL" + # TODO: restore auto-merge + # run: gh pr review --approve -b "Auto-approving dependabot PR." "$PR_URL" && gh pr merge --auto --squash "$PR_URL" + run: gh pr review --approve -b "Auto-approving dependabot PR." "$PR_URL" env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.DIVVIUP_GITHUB_AUTOMATION_DEPENDABOT_APPROVER_PAT}} + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.DIVVIUP_GITHUB_AUTOMATION_DEPENDABOT_APPROVER_PAT }}