feat: docker and versioning stuff

This commit is contained in:
2026-05-14 22:19:03 +02:00
parent d065d90fe1
commit 762b3ef0ab
9 changed files with 72 additions and 20 deletions
+4 -9
View File
@@ -24,19 +24,15 @@ jobs:
id: version
shell: bash
run: |
version="$(tr -d '[:space:]' < VERSION)"
version="$(git rev-parse --short=12 HEAD)"
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.+][0-9A-Za-z.-]+)?$ ]]; then
echo "Invalid VERSION value: $version" >&2
if [[ ! "$version" =~ ^[0-9a-f]{12}$ ]]; then
echo "Invalid git hash version: $version" >&2
exit 1
fi
docker_tag="${version//+/-}"
short_sha="${GITHUB_SHA::7}"
echo "value=$version" >> "$GITHUB_OUTPUT"
echo "docker_tag=$docker_tag" >> "$GITHUB_OUTPUT"
echo "dev_tag=${docker_tag}-dev.${short_sha}" >> "$GITHUB_OUTPUT"
echo "docker_tag=$version" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -59,7 +55,6 @@ jobs:
VCS_REF=${{ github.sha }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.dev_tag }}
labels: |
org.opencontainers.image.version=${{ steps.version.outputs.value }}
org.opencontainers.image.revision=${{ github.sha }}