Skip to content

Commit

Permalink
Merge pull request #1092 from beatfreaker/dependabot-auto-merge-fix
Browse files Browse the repository at this point in the history
Move dependabot job to run after all other jobs
  • Loading branch information
pascalgrimaud authored Mar 19, 2022
2 parents 5e7e5e4 + 01041ea commit 3359869
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,24 @@ jobs:
files: lcov.info
fail_ci_if_error: true
verbose: true
#--------------------------------------------------
# Dependabot auto merge PR
#--------------------------------------------------
dependabot-auto-merge-pr:
name: dependabot-auto-merge-pr
needs: [cypress, generation]
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
if: ${{ github.repository == 'jhipster/jhipster-lite' && github.ref != 'refs/heads/main' && github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.3.0
- name: Enable auto-merge for Dependabot PRs
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
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 3359869

Please sign in to comment.