code cleanup
Some checks failed
Deploy Docker Image / build-and-push (push) Failing after 18s

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2026-01-15 23:05:37 +01:00
parent 3832dead0d
commit 096bf367aa
5 changed files with 73 additions and 27 deletions

View File

@@ -0,0 +1,11 @@
#!/bin/sh
# version_env.sh: Reads the version from the Dockerfile and sets MAJOR, MAJOR_MINOR, VERSION as environment variables
VERSION=$(grep 'org.opencontainers.image.version' Dockerfile | cut -d'=' -f2 | tr -d '"')
MAJOR=$(echo "$VERSION" | cut -d. -f1)
MAJOR_MINOR=$(echo "$VERSION" | awk -F. '{print $1 "." $2}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "MAJOR=$MAJOR" >> $GITHUB_ENV
echo "MAJOR_MINOR=$MAJOR_MINOR" >> $GITHUB_ENV