summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2023-06-12 20:59:17 +0200
committerValery Piashchynski <[email protected]>2023-06-12 20:59:17 +0200
commit7eee69902105a3632104110e5454c3dade0b07b4 (patch)
tree5529bc43d4a4c82940f670c5285942e2c2200214 /.github/workflows/release.yml
parent2f2e5fcb9d1103dc86ce3453c7ec7f84935fdf08 (diff)
feature: add major and latest-on-demand tags for the docker images
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml18
1 files changed, 11 insertions, 7 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f7061e3e..384ebfbf 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -174,8 +174,10 @@ jobs:
- name: Generate builder values
id: values
run: |
- echo "version_minor=$(echo ${GITHUB_REF##*/} | sed -e 's/^[vV]*//' | sed -e 's/\.[0-9]$//')" >> $GITHUB_OUTPUT
- echo "version=$(echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//')" >> $GITHUB_OUTPUT
+ echo "latest_tag=$(echo ${GITHUB_REF##*/} | sed -E -e '/-beta|-alpha|-rc/ s/.*//' -e '/^[^-]*$/ s/.*v[0-9]+\..*/latest/')" >> $GITHUB_OUTPUT
+ echo "version_major=$(echo ${GITHUB_REF##*/} | sed -E -e '/-beta|-alpha|-rc/ s/.*//' -e '/^[^-]*$/ s/v([0-9]+)\..*/\1/')" >> $GITHUB_OUTPUT
+ echo "version_minor=$(echo ${GITHUB_REF##*/} | sed -E -e '/-beta|-alpha|-rc/ s/.*//' -e '/^[^-]*$/ s/v([0-9]+\.[0-9]+).*/\1/' -e '/^[^-]*$/ s/\.0$//')" >> $GITHUB_OUTPUT
+ echo "version_bugfix=$(echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//')" >> $GITHUB_OUTPUT
echo "timestamp=$(echo $(date +%FT%T%z))" >> $GITHUB_OUTPUT
- name: Build image
@@ -186,12 +188,14 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
build-args: |
- APP_VERSION=${{ steps.values.outputs.version }}
+ APP_VERSION=${{ steps.values.outputs.version_bugfix}}
BUILD_TIME=${{ steps.values.outputs.timestamp }}
tags: |
- spiralscout/roadrunner:latest
+ spiralscout/roadrunner:${{ steps.values.outputs.latest_tag }}
+ spiralscout/roadrunner:${{ steps.values.outputs.version_major }}
spiralscout/roadrunner:${{ steps.values.outputs.version_minor }}
- spiralscout/roadrunner:${{ steps.values.outputs.version }}
- ghcr.io/roadrunner-server/roadrunner:latest
+ spiralscout/roadrunner:${{ steps.values.outputs.version_bugfix }}
+ ghcr.io/roadrunner-server/roadrunner:${{ steps.values.outputs.latest_tag }}
+ ghcr.io/roadrunner-server/roadrunner:${{ steps.values.outputs.version_major }}
ghcr.io/roadrunner-server/roadrunner:${{ steps.values.outputs.version_minor }}
- ghcr.io/roadrunner-server/roadrunner:${{ steps.values.outputs.version }}
+ ghcr.io/roadrunner-server/roadrunner:${{ steps.values.outputs.version_bugfix }}