diff --git a/.github/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml similarity index 86% rename from .github/dependabot-auto-merge.yml rename to .github/workflows/dependabot-auto-merge.yml index aa0c2ba7..2edab1d9 100644 --- a/.github/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -9,6 +9,10 @@ permissions: contents: write pull-requests: write +env: + ACTIONS_RUNNER_DEBUG: true + ACTIONS_STEP_DEBUG: true + jobs: dependabot: runs-on: ubuntu-latest @@ -19,12 +23,17 @@ jobs: uses: dependabot/fetch-metadata@v1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Debug outputs variable + run: echo "${{steps.metadata.outputs.directory}}" + - name: Approve a PR if: ${{contains(steps.dependabot-metadata.outputs.directory, '/test')}} run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs if: success() run: gh pr merge --auto --merge "$PR_URL"