mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 20:01:24 +01:00
Merge pull request '[CI] backport: do no nothing if there are no backport labels' (#2757) from earl-warren/forgejo:wip-ci-backport into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2757 Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
This commit is contained in:
commit
7e8e27b8ef
1 changed files with 9 additions and 5 deletions
|
@ -34,10 +34,14 @@ jobs:
|
||||||
!startsWith(vars.ROLE, 'forgejo-') && (
|
!startsWith(vars.ROLE, 'forgejo-') && (
|
||||||
github.event.pull_request.merged
|
github.event.pull_request.merged
|
||||||
&& (
|
&& (
|
||||||
github.event.action == 'closed'
|
(
|
||||||
|| (
|
github.event.action == 'closed' &&
|
||||||
github.event.action == 'labeled'
|
contains(toJSON(github.event.pull_request.labels), 'backport/v')
|
||||||
&& contains(github.event.label.name, 'backport/')
|
)
|
||||||
|
||
|
||||||
|
(
|
||||||
|
github.event.action == 'labeled' &&
|
||||||
|
contains(github.event.label.name, 'backport/v')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -54,7 +58,7 @@ jobs:
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get -q install -qq -y jq
|
apt-get -q install -qq -y jq
|
||||||
filtered_labels=$(echo "$LABELS" | jq -c 'map(select(.name | startswith("backport/")))')
|
filtered_labels=$(echo "$LABELS" | jq -c 'map(select(.name | startswith("backport/v")))')
|
||||||
echo "FILTERED_LABELS=${filtered_labels}" >> $GITHUB_ENV
|
echo "FILTERED_LABELS=${filtered_labels}" >> $GITHUB_ENV
|
||||||
env:
|
env:
|
||||||
LABELS: ${{ toJSON(github.event.pull_request.labels) }}
|
LABELS: ${{ toJSON(github.event.pull_request.labels) }}
|
||||||
|
|
Loading…
Reference in a new issue