From 58f8ea843e4c83c1882479dbcd04da74bab98432 Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Fri, 2 Aug 2024 13:21:11 +0100 Subject: [PATCH] relax patch release regex (#3858) Signed-off-by: Chris Martin Co-authored-by: Chris Martin --- .github/workflows/release-rc.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-rc.yml b/.github/workflows/release-rc.yml index 062ade6ea48..11bc2996845 100644 --- a/.github/workflows/release-rc.yml +++ b/.github/workflows/release-rc.yml @@ -34,7 +34,7 @@ jobs: if [[ "$ref" == "master" ]]; then [ $(git branch --contains=$sha master | wc -l) -eq 1 ] && [ $(git rev-list --count $sha..master) -le 2 ] - elif [[ "$ref" =~ ^patch/v[0-9]+\.[0-9]+\.[0-9]+-patch[0-9]+$ ]]; then + elif [[ "$ref" =~ ^patch/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then [ $(git branch --contains=$sha "$ref" | wc -l) -eq 1 ] && base_tag=${ref#patch/} base_tag=${base_tag%-*} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 397bc9d6786..c8f0263116a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: git fetch --all # Check if it's from master branch or a patch branch - if [ $(git branch -r --contains=$sha | grep -E "origin/(master|patch/v[0-9]+\.[0-9]+\.[0-9]+-patch[0-9]+)$" | wc -l) -eq 0 ]; then + if [ $(git branch -r --contains=$sha | grep -E "origin/(master|patch/v[0-9]+\.[0-9]+\.[0-9]+.*)$" | wc -l) -eq 0 ]; then echo "::error::$sha is not in master or any patch branch" echo "Branches containing this SHA:" git branch -r --contains=$sha