Update tagging
This commit is contained in:
@@ -13,7 +13,18 @@ jobs:
|
||||
-
|
||||
name: Parse Caddy version
|
||||
id: version
|
||||
run: echo "VERSION=$(grep -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]+$' Dockerfile | cut -d ':' -f2)" >> $GITHUB_ENV
|
||||
run: |
|
||||
VERSION=$(grep -Eo 'caddy:[0-9]+\.[0-9]+\.[0-9]+$' Dockerfile | cut -d ':' -f2)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Version from file: $VERSION"
|
||||
|
||||
# Extract semantic version parts
|
||||
MAJOR=$(echo $VERSION | cut -d. -f1)
|
||||
MINOR=$(echo $VERSION | cut -d. -f1-2)
|
||||
|
||||
echo "major_version=$MAJOR" >> $GITHUB_OUTPUT
|
||||
echo "minor_version=$MINOR" >> $GITHUB_OUTPUT
|
||||
echo "Major: $MAJOR, Minor: $MINOR"
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.7.0
|
||||
@@ -30,8 +41,10 @@ jobs:
|
||||
images: |
|
||||
ryuupendragon/caddy
|
||||
tags: |
|
||||
type=raw,value=${{ env.VERSION }},priority=1000
|
||||
type=sha,format=long,prefix=sha-
|
||||
type=raw,value=${{ steps.version.outputs.major_version }}
|
||||
type=raw,value=${{ steps.version.outputs.minor_version }}
|
||||
type=raw,value=${{ steps.version.outputs.version }},priority=1000
|
||||
type=raw,value=latest
|
||||
-
|
||||
name: Build and push
|
||||
|
||||
Reference in New Issue
Block a user