From bdad2232004bf983b80da8940c950090ca008e1d Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Fri, 11 Oct 2024 14:56:29 +0200 Subject: [PATCH] Test out getting major versions (#4293) --- .github/workflows/building-docker-release.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/building-docker-release.yml b/.github/workflows/building-docker-release.yml index bccbdf2d7..d8b48413b 100644 --- a/.github/workflows/building-docker-release.yml +++ b/.github/workflows/building-docker-release.yml @@ -28,6 +28,21 @@ jobs: uses: dawidd6/action-get-tag@v1 with: strip_v: true + - name: Extract version (alternative version) + id: extract_version + run: | + VERSION_TAG=${GITHUB_REF#refs/tags/} + echo "Git tag: $VERSION_TAG" + + VERSION=${VERSION_TAG#v} + echo "Full version without 'v': $VERSION" + + MAJOR_VERSION=${VERSION%%.*} + echo "Major version: $MAJOR_VERSION" + + # Set outputs for use in later steps + echo "::set-output name=VERSION::$VERSION" + echo "::set-output name=MAJOR_VERSION::$MAJOR_VERSION" - name: Build and push sitespeed.io uses: docker/build-push-action@v5