mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-01-12 01:01:16 -05:00
CI: add backport workflow
Refs: https://codeberg.org/forgejo/docs/issues/18
This commit is contained in:
parent
3d68e4f36e
commit
2fd1640125
1 changed files with 29 additions and 0 deletions
29
.forgejo/workflows/backport.yml
Normal file
29
.forgejo/workflows/backport.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: backport
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
backport:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: node:20-bookworm
|
||||||
|
# Only react to merged PRs for security reasons.
|
||||||
|
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
|
||||||
|
if: >
|
||||||
|
github.event.pull_request.merged
|
||||||
|
&& (
|
||||||
|
github.event.action == 'closed'
|
||||||
|
|| (
|
||||||
|
github.event.action == 'labeled'
|
||||||
|
&& contains(github.event.label.name, 'backport')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
steps:
|
||||||
|
- name: send backport if the label "backport {branch}" is present
|
||||||
|
uses: https://github.com/tibdex/backport@v2
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Reference in a new issue