lol
at 24.11-pre 35 lines 1.6 kB view raw
1name: Backport 2on: 3 pull_request_target: 4 types: [closed, labeled] 5 6# WARNING: 7# When extending this action, be aware that $GITHUB_TOKEN allows write access to 8# the GitHub repository. This means that it should not evaluate user input in a 9# way that allows code injection. 10 11permissions: 12 contents: read 13 14jobs: 15 backport: 16 permissions: 17 contents: write # for korthout/backport-action to create branch 18 pull-requests: write # for korthout/backport-action to create PR to backport 19 name: Backport Pull Request 20 if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name)) 21 runs-on: ubuntu-latest 22 steps: 23 - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 24 with: 25 ref: ${{ github.event.pull_request.head.sha }} 26 - name: Create backport PRs 27 uses: korthout/backport-action@ef20d86abccbac3ee3a73cb2efbdc06344c390e5 # v2.5.0 28 with: 29 # Config README: https://github.com/korthout/backport-action#backport-action 30 copy_labels_pattern: 'severity:\ssecurity' 31 pull_description: |- 32 Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}. 33 34 * [ ] Before merging, ensure that this backport is [acceptable for the release](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#changes-acceptable-for-releases). 35 * Even as a non-commiter, if you find that it is not acceptable, leave a comment.