Skip to content

treewide: add developer shell and pre-commit hooks and simplify GitHub workflows #39

treewide: add developer shell and pre-commit hooks and simplify GitHub workflows

treewide: add developer shell and pre-commit hooks and simplify GitHub workflows #39

Workflow file for this run

---
# Derived from
# https://github.com/NixOS/nixpkgs/blob/2ab6f6d61630889491f86396b27a76ffb6fbc7bb/.github/workflows/backport.yml
name: Backport
on: # yamllint disable-line rule:truthy
pull_request_target:
types: [closed, labeled]
permissions: {}
jobs:
backport:
runs-on: ubuntu-latest
if: >
(
github.repository_owner == 'danth' &&
github.event.pull_request.merged == true &&
(
github.event_name != 'labeled' ||
startsWith('backport', github.event.label.name)
)
)
steps:
# Use a GitHub App rather than the default token so that GitHub Actions
# workflows may run on the created pull request.
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.BACKPORT_APP_ID }}
private-key: ${{ secrets.BACKPORT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ steps.app-token.outputs.token }}
- uses: korthout/backport-action@v3
with:
github_token: ${{ steps.app-token.outputs.token }}
pull_title: "[${target_branch}] ${pull_title}"
pull_description: "This is an automated backport of #${pull_number}."