12.nixvim/.github/workflows/backport.yml
dependabot[bot] 009a661a34 ci: 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 23:24:35 +00:00

49 lines
1.3 KiB
YAML

# Based on
# https://github.com/NixOS/nixpkgs/blob/2566f9dc/.github/workflows/backport.yml
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
defaults:
run:
shell: bash
jobs:
backport:
name: Backport Pull Request
if: >
vars.CI_APP_ID
&& github.event.pull_request.merged == true
&& (
github.event.action != 'labeled'
|| startsWith(github.event.label.name, 'backport')
)
runs-on: ubuntu-24.04-arm
steps:
- name: Create GitHub App token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: actions/checkout@v5
with:
token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
id: backport
uses: korthout/backport-action@v4
with:
# See https://github.com/korthout/backport-action#inputs
github_token: ${{ steps.app-token.outputs.token }}
branch_name: backport/${target_branch}/${pull_number}
copy_labels_pattern: .*