mirror of
https://github.com/neovim/neovim.git
synced 2026-01-03 01:46:31 +10:00
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>
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: backport
|
|
on:
|
|
pull_request_target:
|
|
types: [closed, labeled]
|
|
jobs:
|
|
backport:
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
name: Backport Pull Request
|
|
if: github.event.pull_request.merged
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/create-github-app-token@v2
|
|
id: app-token
|
|
with:
|
|
app-id: ${{ vars.BACKPORT_APP }}
|
|
private-key: ${{ secrets.BACKPORT_KEY }}
|
|
|
|
- name: Create backport PR
|
|
id: backport
|
|
uses: korthout/backport-action@v4
|
|
with:
|
|
pull_title: "${pull_title}"
|
|
label_pattern: "^ci:backport ([^ ]+)$"
|
|
github_token: ${{ steps.app-token.outputs.token }}
|
|
|
|
- name: Create failed backport label
|
|
if: ${{ steps.backport.outputs.was_successful == 'false' }}
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
github.rest.issues.addLabels({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
labels: ['needs:backport']
|
|
})
|
|
|
|
- name: Enable automerge
|
|
if: ${{ steps.backport.outputs.was_successful == 'true' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: gh pr merge --rebase --auto ${{ steps.backport.outputs.created_pull_numbers }}
|