diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 5122bbd..9d8c79d 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -1,7 +1,5 @@ -name: Dependabot Auto Merge - on: - pull_request_target: + pull_request: permissions: contents: write @@ -9,11 +7,16 @@ permissions: jobs: dependabot: - if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' steps: - - uses: fastify/github-action-merge-dependabot@v3 + - id: metadata + uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - merge-method: squash - target: minor \ No newline at end of file + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - if: steps.metadata.outputs.update-type != 'version-update:semver-major' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1dbfdd0..3ef3e88 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,5 +1,3 @@ -name: Build Plugin - on: workflow_dispatch: push: