From 7ae2f9086fa4a88ac9ead00f8e8e2cc94097c94c Mon Sep 17 00:00:00 2001 From: Michael Buluma Date: Mon, 8 Jan 2024 21:13:45 +0300 Subject: [PATCH] Dependabot automerge. --- .github/workflows/molecule.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 4c1a3f6..1d98a51 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -17,12 +17,15 @@ on: tags_ignore: - '*' pull_request: + pull_request_target: schedule: - cron: '9 5 5 * *' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +permissions: write-all + concurrency: group: ${{ github.ref }}-${{ github.workflow }} cancel-in-progress: true @@ -57,3 +60,25 @@ jobs: with: image: ${{ matrix.config.image }} tag: ${{ matrix.config.tag }} + + dependabot: + needs: test + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'buluma' && github.event_name == 'pull_request'}} + 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 }}