From aed65a674ed84099f3569e2733c142eeda3e00fd Mon Sep 17 00:00:00 2001 From: jyje Date: Sat, 7 Sep 2024 18:23:46 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20ci/release:=20extract=20tag=20fr?= =?UTF-8?q?om=20requirements.txt=20(--no-ci)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f5eeab7..1f117f4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,10 +24,9 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Extract tag name - run: echo "image_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - - - name: Check tag format run: | + cat requirements.txt | grep -oP '==\K[0-9]+\.[0-9]+\.[0-9]+' > tag.txt + echo "image_version=v$(cat tag.txt)" >> $GITHUB_ENV TAG_NAME="${{ env.image_version }}" if ! [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then echo "Tag $TAG_NAME does not meet the required format 'vX.Y.Z'."