diff --git a/.github/workflows/depandabot_merge.yml b/.github/workflows/depandabot_merge.yml new file mode 100644 index 0000000..dd8b15d --- /dev/null +++ b/.github/workflows/depandabot_merge.yml @@ -0,0 +1,35 @@ +--- +# +# Ansible managed +# + +name: "Dependabot Merge" + +on: + pull_request: + pull_request_target: + +permissions: + contents: write + pull-requests: write + +jobs: + build: + runs-on: "ubuntu-20.04" + steps: + - uses: "actions/checkout@master" + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Merge Dependabot PR" + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}