Enhance versionning on build packages #165

Merged
metal3d merged 4 commits from :master into master 2025-08-22 08:33:32 +00:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit f7f8ae688e - Show all commits

View File

@@ -61,6 +61,7 @@ jobs:
- name: Compile binary
if: matrix.goos == 'linux' || matrix.goos == 'freebsd' || matrix.goos == 'darwin'
run: |-
echo "Building binary version $VERSION"
mkdir -p dist
GOARCH=${{ matrix.goarch }} GOOS=${{ matrix.goos }}\
go build -ldflags="-X 'repo.katenary.io/katenary/katenary/internal/generator.Version=$VERSION'" \

View File

@@ -19,7 +19,7 @@ jobs:
steps:
- name: Extract version
run: |
VERSION="${GITEA_REFNAME#releases/}
VERSION="${GITEA_REFNAME#releases/}"
echo "VERSION=$VERSION" >> $GITEA_OUTPUT
echo "VERSION=$VERSION" >> $GITEA_ENV
@@ -42,6 +42,7 @@ jobs:
- name: Build and tag
run: |-
echo "Building image $REGISTRY/${IMAGE_NAME,,}:$VERSION / latest"
buildah build --isolation=chroot --build-arg VERSION=$VERSION -t katenary -f ./oci/katenary/Containerfile .
buildah tag katenary $REGISTRY/${IMAGE_NAME,,}:$VERSION
buildah tag katenary $REGISTRY/${IMAGE_NAME,,}:latest