Test out getting major versions (#4293)

This commit is contained in:
Peter Hedenskog 2024-10-11 14:56:29 +02:00 committed by GitHub
parent 14def06cb7
commit bdad223200
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 0 deletions

View File

@ -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