Warning
This Action is still under active development and should not be used in any project until a stable release is available.
This GitHub Action backports PRs to other branches using labels. When PRs are
merged, it looks for labels with the pattern backport/v<VERSION> and
backports the PR commits to a branch created from base named rel/v<VERSION>.
If the backport succeeds, it creates a new pull request for review. If the backport contains merge conflicts, it commits the conflicts and creates a draft pull request where the conflicts can be resolved and merged.
- uses: "oxidecomputer/backport-pr-action@v1"
with:
# PR number to be backported.
# Required.
pr: ''
# The name to use in backport commits.
# Required.
bot-name: ''
# The email to use in backport commits.
# Required.
bot-email: ''name: "Backport"
on:
pull_request_target:
types:
- "closed"
- "labeled"
concurrency:
group: "PR #${{ github.event.pull_request.number }}"
cancel-in-progress: false
jobs:
backport:
if: "github.event.pull_request.merged"
runs-on: "ubuntu-24.04"
permissions:
contents: "write"
pull-requests: "write"
steps:
- uses: "actions/checkout@v5"
with:
ref: "main"
clean: false
fetch-depth: 0
- uses: "oxidecomputer/backport-pr-action@v0"
with:
pr: "${{ github.event.pull_request.number }}"
bot-name: "Backport Bot"
bot-email: "bot@example.com"