Skip to content

Commit

Permalink
πŸ”€ Merge pull request #13 from jyje/develop
Browse files Browse the repository at this point in the history
πŸ”§ ci/release: extract tag from requirements.txt (--no-ci)
  • Loading branch information
jyje authored Sep 7, 2024
2 parents 14059b4 + aed65a6 commit 1adb585
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'."
Expand Down

0 comments on commit 1adb585

Please sign in to comment.