add release-tag action with prefix matching

main
Fabrice Roublot 2024-10-15 17:41:27 +02:00
parent e74b929d98
commit ff8179b8d6
1 changed files with 9 additions and 1 deletions

View File

@ -35,6 +35,14 @@ jobs:
echo "PRODUCT_VERSION=$product_version" >> $GITHUB_ENV
echo "BUILD_NUMBER=$build_number" >> $GITHUB_ENV
- name: Extract version number from RELEASE_TAG
run: |
VERSION_NUMBER=${{ env.RELEASE_TAG#ws-office- }}
echo "VERSION_NUMBER=$VERSION_NUMBER" >> $GITHUB_ENV
- name: Print the version number (for debugging)
run: echo "Version number: ${{ env.VERSION_NUMBER }}"
- name: Docker Build
uses: https://github.com/docker/build-push-action@v4
env:
@ -49,7 +57,7 @@ jobs:
linux/amd64
push: true
tags: |
git2.workstreams.ch/workstreams-os/ws-office-dev:${{ env.RELEASE_TAG }}
git2.workstreams.ch/workstreams-os/ws-office-prod:${{ env.VERSION_NUMBER }}
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max