Skip to content

Commit

Permalink
Dependabot automerge.
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Jan 8, 2024
1 parent 35522b8 commit 7ae2f90
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

0 comments on commit 7ae2f90

Please sign in to comment.