Skip to content

Commit

Permalink
automerge dependabot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
frioux committed Nov 12, 2022
1 parent a6d51a3 commit 82f5e35
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 29 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/auto-approve.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/auto-merge.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
on: [push]

permissions:
contents: write
pull-request: write

jobs:
test:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -53,6 +57,25 @@ jobs:
name: leatherman-windows.zip
path: leatherman-windows.zip

dependabot:
runs-on: ubuntu-latest
# Only run this job for dependabot PRs
if: ${{ github.actor == 'dependabot[bot]' }}

# Only run if the required checks pass
needs: [test, build, build-windows]

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Auto-merge Dependabot PRs
# Find the PR number based on the current branch name, and squash merge based on this number
run: 'PR_NUM="$(gh pr list | grep $(git branch --show-current) | cut -f1)"; gh pr merge --auto --squash $PR_NUM'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}


release:
needs: [test, build, build-windows]
runs-on: ubuntu-20.04
Expand Down

0 comments on commit 82f5e35

Please sign in to comment.