Skip to content

build: fix release workflow #9

build: fix release workflow

build: fix release workflow #9

Workflow file for this run

name: Auto-merge Dependabot PRs
on:
pull_request_target:
types:
- opened
- synchronize
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Get PR info
id: pr
uses: actions/github-script@v7
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
// Only auto-merge patch updates
const title = pr.data.title.toLowerCase();
const isPatch = title.includes('patch') ||
title.match(/bump .+ from [\d]+\.[\d]+\.[\d]+ to [\d]+\.[\d]+\.[\d]+$/);
return { shouldMerge: isPatch };
- name: Wait for checks
if: fromJSON(steps.pr.outputs.result).shouldMerge
uses: fountainhead/action-wait-for-check@v1.2.0
id: wait-for-checks
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: 'Tests (PHP 8.3)'
ref: ${{ github.event.pull_request.head.sha }}
timeoutSeconds: 300
- name: Auto-merge
if: fromJSON(steps.pr.outputs.result).shouldMerge && steps.wait-for-checks.outputs.conclusion == 'success'
uses: pascalgn/merge-action@v0.15.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
merge_method: squash