mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
This reverts commit 9f3ab71647.
cascade-setup-end-to-end no longer works after this was merged: https://codeberg.org/forgejo/forgejo/actions/runs/140733/jobs/0/attempt/2
```
/var/run/act/actions/69/9e734ffd2a2ec8ed9c2f818ed272523f52007304147edf2d7efae8d6e0c3a5/cascading-pr.sh:26: repo_curl: forgejo-curl.sh api_json https://codeberg.org/api/v1/repos/forgejo/forgejo/pulls/11401
curl: option -H: error encountered when reading a file
curl: try 'curl --help' or 'curl --manual' for more information
/var/run/act/actions/69/9e734ffd2a2ec8ed9c2f818ed272523f52007304147edf2d7efae8d6e0c3a5/cascading-pr.sh:1: pr_get_origin: rm -fr /tmp/tmp.nZPEP759PH
fail /var/run/act/actions/69/9e734ffd2a2ec8ed9c2f818ed272523f52007304147edf2d7efae8d6e0c3a5/cascading-pr.sh
```
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11406
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
# Copyright 2024 The Forgejo Authors
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
# To modify this workflow:
|
|
#
|
|
# - change pull_request_target: to pull_request:
|
|
# so that it runs from a pull request instead of the default branch
|
|
#
|
|
# - push it to the wip-ci-backport branch on the forgejo repository
|
|
# otherwise it will not have access to the secrets required to push
|
|
# the PR
|
|
#
|
|
# - open a pull request targetting wip-ci-backport that includes a change
|
|
# that can be backported without conflict in v1.21 and set the
|
|
# `backport/v1.21` label.
|
|
#
|
|
# - once it works, open a pull request for the sake of keeping track
|
|
# of the change even if the PR won't run it because it will use
|
|
# whatever is in the default branch instead
|
|
#
|
|
# - after it is merged, double check it works by setting a
|
|
# `backport/v1.21` label on a merged pull request that can be backported
|
|
# without conflict.
|
|
#
|
|
name: issue-labels
|
|
|
|
on:
|
|
pull_request_target:
|
|
types:
|
|
- closed
|
|
- labeled
|
|
|
|
jobs:
|
|
backporting:
|
|
if: >
|
|
( vars.ROLE == 'forgejo-coding' ) && (
|
|
github.event.pull_request.merged
|
|
&&
|
|
contains(toJSON(github.event.pull_request.labels), 'backport/v')
|
|
)
|
|
runs-on: docker
|
|
container:
|
|
image: 'data.forgejo.org/oci/node:24-bookworm'
|
|
steps:
|
|
- name: event info
|
|
run: |
|
|
cat <<'EOF'
|
|
${{ toJSON(github) }}
|
|
EOF
|
|
- uses: https://data.forgejo.org/actions/git-backporting@v4.8.7
|
|
with:
|
|
target-branch-pattern: "^backport/(?<target>(v.*))$"
|
|
strategy: ort
|
|
strategy-option: find-renames
|
|
cherry-pick-options: -x
|
|
auth: ${{ secrets.BACKPORT_TOKEN }}
|
|
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
|