diff --git a/.github/workflows/auto_dependabot.yml b/.github/workflows/auto_dependabot.yml new file mode 100644 index 0000000..84ac3c3 --- /dev/null +++ b/.github/workflows/auto_dependabot.yml @@ -0,0 +1,28 @@ +name: Auto Actions for Dependabot + +on: + pull_request: + +permissions: + contents: read + +jobs: + auto_approve_merge: + # Job level permissions are required to approve and merge PRs + permissions: + pull-requests: write + contents: write + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Auto approve + run: gh pr review "$PR_URL" --approve --body "Auto approved by Dependabot" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Automerge + run: gh pr merge "$PR_URL" --squash --auto + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/report_test_results.yml b/.github/workflows/report_test_results.yml index 73f1055..77f506b 100644 --- a/.github/workflows/report_test_results.yml +++ b/.github/workflows/report_test_results.yml @@ -15,6 +15,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read + actions: read checks: write pull-requests: write steps: @@ -34,4 +35,4 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0 with: files: "test_results/**/*.xml" - if: always() \ No newline at end of file + if: always()