mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 19:11:58 +01:00
chore(ci): make backporting job copy/pastable
Refs: forgejo/forgejo#5999
This commit is contained in:
parent
a5363a539b
commit
b6869d643e
1 changed files with 10 additions and 25 deletions
|
@ -1,27 +1,8 @@
|
|||
# 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:
|
||||
|
@ -31,16 +12,20 @@ on:
|
|||
jobs:
|
||||
backporting:
|
||||
if: >
|
||||
( vars.ROLE == 'forgejo-coding' ) && (
|
||||
github.event.pull_request.merged
|
||||
&&
|
||||
vars.ROLE == 'forgejo-coding' &&
|
||||
|
||||
secrets.BACKPORT_TOKEN != '' &&
|
||||
|
||||
github.event_name == 'pull_request_target' &&
|
||||
(
|
||||
github.event.pull_request.merged &&
|
||||
contains(toJSON(github.event.pull_request.labels), 'backport/v')
|
||||
)
|
||||
runs-on: docker
|
||||
container:
|
||||
image: 'code.forgejo.org/oci/node:20-bookworm'
|
||||
steps:
|
||||
- name: event info
|
||||
- name: Debug info
|
||||
run: |
|
||||
cat <<'EOF'
|
||||
${{ toJSON(github) }}
|
||||
|
|
Loading…
Reference in a new issue