Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: automatically merge dependabot PRs on dependencies branch (if they pass tests) #2798

Merged
merged 7 commits into from
Jan 17, 2025
Merged
5 changes: 3 additions & 2 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Auto approve

on: pull_request_target

permissions:
pull-requests: write

jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.actor == 'dependabot[bot]'
steps:
- uses: hmarr/auto-approve-action@v4
17 changes: 17 additions & 0 deletions .github/workflows/auto-merge.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Could add a comment here that the auto-merge still gates on the build/test workflow succeeding

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Dependabot auto-merge

on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' && github.ref == 'refs/heads/dependencies'
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/dependencies-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Dependabot auto-merge

on:
schedule:
- cron: "0 2 * * 6"
paulschreiber marked this conversation as resolved.
Show resolved Hide resolved

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
steps:
- name: Create dependencies branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: "dependencies"
Loading