Something went wrong. Try again.
forked from nix-community/nixvim
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556# Based on# https://github.com/NixOS/nixpkgs/blob/2566f9dc/.github/workflows/backport.ymlname: 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@v3 id: app-token with: app-id: ${{ vars.CI_APP_ID }} private-key: ${{ secrets.CI_APP_PRIVATE_KEY }} permission-contents: write permission-workflows: write permission-pull-requests: write
- uses: actions/checkout@v7 with: token: ${{ steps.app-token.outputs.token }} ref: ${{ github.event.pull_request.head.sha }} # Unsafely checkout the PR HEAD. # backport-action does not execute any code from the checkout. allow-unsafe-pr-checkout: true # backport-action needs git credentials to operate. persist-credentials: true
- 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: .*