neovim-flake/.github/workflows/backport.yml
dependabot[bot] 3346621cb5
build(deps): bump korthout/backport-action from 3 to 4
Bumps [korthout/backport-action](https://github.com/korthout/backport-action) from 3 to 4.
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](https://github.com/korthout/backport-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 19:08:33 +00:00

33 lines
1.1 KiB
YAML

name: Backport PR on Label
on:
pull_request_target:
types:
- labeled
# Permissions needed for the korthout/backport-action to create branches and PRs
permissions:
contents: write
pull-requests: write
jobs:
backport:
name: Create Backport PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true && startsWith(github.event.label.name, 'backport-')
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ steps.app-token.outputs.token }}
- name: Backport Action
uses: korthout/backport-action@v4
with:
# Regex pattern for labels that should trigger a backport AND extracts the target branch
# from the name (e.g. v0.x or v0.x.y; we use zerover). This action will ONLY proceed if
# the label that triggered the workflow fully matches this pattern.
# Example matching labels: "backport-v0.1", "backport-v0.10.1"
# Example non-matching labels: "backport-foo", "backport-v1.0"
label_pattern: '^backport-(v0\.\d+(\.\d+)?)$'