mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
- prettier 3.8.3 -> 3.8.4 (dev) - undici 8.3.0 -> 8.4.1 - lucide-react 1.17.0 -> 1.18.0 - docker/metadata-action 6.0.0 -> 6.1.0 - dependabot/fetch-metadata 2.5.0 -> 3.1.0
61 lines
2.0 KiB
YAML
61 lines
2.0 KiB
YAML
name: Auto-merge Dependabot
|
|
|
|
on: pull_request
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
auto-merge:
|
|
runs-on: ubuntu-latest
|
|
if: github.actor == 'dependabot[bot]'
|
|
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
|
|
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
|
|
|
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: 22
|
|
cache: "pnpm"
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- run: pnpm db:generate
|
|
|
|
- run: pnpm test
|
|
|
|
# Auto-merge is gated on the Dependabot-declared update type:
|
|
# patch and minor bumps merge once required checks pass; major
|
|
# bumps get a comment and wait for the maintainer. A major bump
|
|
# routinely carries breaking changes the unit suite alone cannot
|
|
# vouch for.
|
|
- name: Fetch Dependabot metadata
|
|
id: metadata
|
|
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Enable auto-merge (patch / minor only)
|
|
if: >-
|
|
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
|
|
steps.metadata.outputs.update-type == 'version-update:semver-minor'
|
|
run: gh pr merge --auto --squash "$PR_URL"
|
|
env:
|
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Flag major update for manual review
|
|
if: steps.metadata.outputs.update-type == 'version-update:semver-major'
|
|
run: >-
|
|
gh pr comment "$PR_URL" --body
|
|
"Major version bump (${DEP_NAMES}) — auto-merge is intentionally
|
|
disabled for semver-major updates. Review the upstream changelog
|
|
and merge manually."
|
|
env:
|
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
DEP_NAMES: ${{ steps.metadata.outputs.dependency-names }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|