2024-03-23 09:39:23 +01:00
|
|
|
# Copyright 2024 The Forgejo Authors
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
2024-11-17 19:13:14 +01:00
|
|
|
name: issue-labels
|
|
|
|
|
2024-03-23 09:39:23 +01:00
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
- labeled
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
backporting:
|
|
|
|
if: >
|
2024-11-17 19:13:14 +01:00
|
|
|
vars.ROLE == 'forgejo-coding' &&
|
|
|
|
|
|
|
|
secrets.BACKPORT_TOKEN != '' &&
|
|
|
|
|
|
|
|
github.event_name == 'pull_request_target' &&
|
|
|
|
(
|
|
|
|
github.event.pull_request.merged &&
|
2024-03-30 13:35:56 +01:00
|
|
|
contains(toJSON(github.event.pull_request.labels), 'backport/v')
|
2024-03-23 09:39:23 +01:00
|
|
|
)
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
2024-08-12 16:11:35 +02:00
|
|
|
image: 'code.forgejo.org/oci/node:20-bookworm'
|
2024-03-23 09:39:23 +01:00
|
|
|
steps:
|
2024-11-17 19:13:14 +01:00
|
|
|
- name: Debug info
|
2024-03-31 00:22:51 +01:00
|
|
|
run: |
|
|
|
|
cat <<'EOF'
|
|
|
|
${{ toJSON(github) }}
|
|
|
|
EOF
|
2024-11-03 01:03:53 +01:00
|
|
|
- uses: https://code.forgejo.org/actions/git-backporting@v4.8.4
|
2024-03-23 09:39:23 +01:00
|
|
|
with:
|
2024-04-11 10:15:38 +02:00
|
|
|
target-branch-pattern: "^backport/(?<target>(v.*))$"
|
2024-03-30 09:44:19 +01:00
|
|
|
strategy: ort
|
|
|
|
strategy-option: find-renames
|
2024-04-03 07:30:42 +02:00
|
|
|
cherry-pick-options: -x
|
2024-03-23 09:39:23 +01:00
|
|
|
auth: ${{ secrets.BACKPORT_TOKEN }}
|
|
|
|
pull-request: ${{ github.event.pull_request.url }}
|
2024-04-11 10:15:38 +02:00
|
|
|
auto-no-squash: true
|
2024-04-15 18:23:57 +02:00
|
|
|
enable-err-notification: true
|
2024-07-31 17:43:36 +02:00
|
|
|
git-user: forgejo-backport-action
|
|
|
|
git-email: forgejo-backport-action@noreply.codeberg.org
|