mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-20 08:42:45 -05:00
34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
name: auto-merge
|
|
|
|
on: pull_request_target
|
|
|
|
jobs:
|
|
auto-merge:
|
|
runs-on: ubicloud-standard-2
|
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
permissions:
|
|
pull-requests: write
|
|
issues: write
|
|
repository-projects: write
|
|
contents: write
|
|
steps:
|
|
- name: "Metadata"
|
|
id: metadata
|
|
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
|
|
with:
|
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
- name: "Enable auto-squash"
|
|
id: enable-auto-squash
|
|
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
|
run: gh pr merge --auto --squash "$PR_URL"
|
|
env:
|
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: "Approve (minor & patch)"
|
|
id: approve
|
|
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'
|
|
run: gh pr review --approve "$PR_URL"
|
|
env:
|
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|