mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-02-08 04:26:39 -05:00
ci: fix after merge backporting, use actions/git-backporting
close #1042
This commit is contained in:
parent
bef5a1a025
commit
02402ce1c2
1 changed files with 22 additions and 19 deletions
|
@ -7,26 +7,29 @@ on:
|
||||||
- labeled
|
- labeled
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backport:
|
backporting:
|
||||||
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: >
|
if: >
|
||||||
github.event.pull_request.merged
|
github.event.pull_request.merged
|
||||||
&& (
|
&&
|
||||||
github.event.action == 'closed'
|
contains(toJSON(github.event.pull_request.labels), 'backport/v')
|
||||||
|| (
|
runs-on: docker
|
||||||
github.event.action == 'labeled'
|
container:
|
||||||
&& contains(github.event.label.name, 'backport')
|
image: 'data.forgejo.org/oci/node:20-bookworm'
|
||||||
)
|
|
||||||
)
|
|
||||||
steps:
|
steps:
|
||||||
- name: send backport if the label "backport {branch}" is present
|
- name: event info
|
||||||
if: secrets.WEBSITETOKEN != ''
|
run: |
|
||||||
uses: https://github.com/tibdex/backport@v2
|
cat <<'EOF'
|
||||||
|
${{ toJSON(github) }}
|
||||||
|
EOF
|
||||||
|
- uses: https://data.forgejo.org/actions/git-backporting@v4.8.4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.WEBSITETOKEN }}
|
target-branch-pattern: '^backport/(?<target>(v.*))$'
|
||||||
head_template: 'backport/<%= base %>/pr-<%= number %>'
|
strategy: ort
|
||||||
label_pattern: '^backport/(?<base>([^ ]+))$'
|
strategy-option: find-renames
|
||||||
|
cherry-pick-options: -x
|
||||||
|
auth: ${{ secrets.WEBSITETOKEN }}
|
||||||
|
pull-request: ${{ github.event.pull_request.url }}
|
||||||
|
auto-no-squash: true
|
||||||
|
enable-err-notification: true
|
||||||
|
git-user: forgejo-backport-action
|
||||||
|
git-email: forgejo-backport-action@noreply.codeberg.org
|
||||||
|
|
Loading…
Add table
Reference in a new issue