Skip to content

Commit

Permalink
change: use nowsprinting/check-version-format-action to detect stable…
Browse files Browse the repository at this point in the history
… version tag
  • Loading branch information
ponkio-o committed May 1, 2024
1 parent 509a72b commit 89602bc
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
with:
submodules: recursive

- uses: nowsprinting/check-version-format-action@98485692a883d962227b09f40f29a63de0771299 # v4.0.2
id: version
with:
prefix: "v"

- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0

Expand All @@ -52,21 +57,8 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Detect pre-release
id: check_tag
run: |
if [[ ! ${{ github.ref_name }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "This is a pre-release tag"
echo "pre_release=true" >> $GITHUB_ENV
exit 0
else
echo "This is a not pre-release tag"
echo "pre_release=false" >> $GITHUB_ENV
exit 0
fi
- name: Add latest tag
if: steps.check_tag.outputs.pre_release != 'true'
if: steps.version.outputs.is_stable == 'true'
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
platforms: linux/amd64,linux/arm64
Expand Down

0 comments on commit 89602bc

Please sign in to comment.