-
-
Notifications
You must be signed in to change notification settings - Fork 29
36 lines (33 loc) · 1.66 KB
/
merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Auto Merge
on: pull_request_target
permissions:
pull-requests: write
contents: write
jobs:
enable-auto-merge:
runs-on: ubuntu-latest
if: ${{ github.repository == 'jhipster/generator-jhipster-micronaut' && github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]
- 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}}
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
if: steps.dependabot-metadata.outputs.dependency-names == 'io.micronaut.platform:micronaut-platform'
- uses: jhipster/actions/setup-git@v0
if: steps.dependabot-metadata.outputs.dependency-names == 'io.micronaut.platform:micronaut-platform'
- name: download bom
run: |
wget -O micronaut-platform.pom https://repo1.maven.org/maven2/io/micronaut/platform/micronaut-platform/${{ steps.dependabot-metadata.outputs.new-version }}/micronaut-platform-${{ steps.dependabot-metadata.outputs.new-version }}.pom
git add .
git commit -a -m "update micronaut-platform bom to v${{ steps.dependabot-metadata.outputs.new-version }}"
git push -u origin
working-directory: generators/micronaut/resources
if: steps.dependabot-metadata.outputs.dependency-names == 'io.micronaut.platform:micronaut-platform'