You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.6 KiB
39 lines
1.6 KiB
3 years ago
|
name: Backport
|
||
|
on:
|
||
3 years ago
|
pull_request_target:
|
||
3 years ago
|
types: [closed, labeled]
|
||
2 years ago
|
|
||
|
# WARNING:
|
||
|
# When extending this action, be aware that $GITHUB_TOKEN allows write access to
|
||
|
# the GitHub repository. This means that it should not evaluate user input in a
|
||
|
# way that allows code injection.
|
||
|
|
||
2 years ago
|
permissions:
|
||
|
contents: read
|
||
|
|
||
3 years ago
|
jobs:
|
||
|
backport:
|
||
2 years ago
|
permissions:
|
||
|
contents: write # for zeebe-io/backport-action to create branch
|
||
|
pull-requests: write # for zeebe-io/backport-action to create PR to backport
|
||
3 years ago
|
name: Backport Pull Request
|
||
3 years ago
|
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
|
||
3 years ago
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
2 years ago
|
- uses: actions/checkout@v3
|
||
3 years ago
|
with:
|
||
3 years ago
|
# required to find all branches
|
||
|
fetch-depth: 0
|
||
3 years ago
|
ref: ${{ github.event.pull_request.head.sha }}
|
||
3 years ago
|
- name: Create backport PRs
|
||
2 years ago
|
uses: zeebe-io/backport-action@v0.0.8
|
||
3 years ago
|
with:
|
||
3 years ago
|
# Config README: https://github.com/zeebe-io/backport-action#backport-action
|
||
3 years ago
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||
|
github_workspace: ${{ github.workspace }}
|
||
3 years ago
|
pull_description: |-
|
||
|
Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.
|
||
|
|
||
3 years ago
|
* [ ] Before merging, ensure that this backport complies with the [Criteria for Backporting](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#criteria-for-backporting-changes).
|
||
3 years ago
|
* Even as a non-commiter, if you find that it does not comply, leave a comment.
|