From 5ceb618dd1dd84926c9c4e237700a56a225003ea Mon Sep 17 00:00:00 2001 From: Aviv Dozorets Date: Sat, 30 May 2026 18:41:30 +0300 Subject: [PATCH 1/2] ci: build Docker image on chart-releaser tags The Release workflow only triggered on v* tags, but chart-releaser tags the Helm chart as klag-. Bumping the chart to 0.1.12 created a klag-0.1.12 tag (not v0.1.12), so themoah/klag:0.1.12 was never built. ArtifactHub then failed scanning the image referenced by the chart. - trigger Release on klag-* tags too - for klag-* tags, derive image version from appVersion in build.gradle.kts - always cut the app release as v to avoid colliding with the klag- chart tag Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 277813b..85b178f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,9 @@ on: push: tags: - 'v*' + # chart-releaser tags the Helm chart as klag-; build the image too + # so the appVersion image referenced by the chart always exists. + - 'klag-*' workflow_dispatch: inputs: version: @@ -39,7 +42,10 @@ jobs: - name: Extract version id: version run: | - if [[ "${{ github.event_name }}" == "push" ]]; then + if [[ "${{ github.event_name }}" == "push" && "${GITHUB_REF_NAME}" == klag-* ]]; then + # Chart tag (klag-): use appVersion from build.gradle.kts. + VERSION=$(grep -oP 'version\s*=\s*"\K[^"]+' build.gradle.kts) + elif [[ "${{ github.event_name }}" == "push" ]]; then VERSION="${GITHUB_REF_NAME#v}" elif [[ -n "${{ inputs.version }}" ]]; then VERSION="${{ inputs.version }}" @@ -87,6 +93,6 @@ jobs: uses: softprops/action-gh-release@v2 with: name: Klag v${{ steps.version.outputs.version }} - tag_name: ${{ github.event_name == 'push' && github.ref_name || format('v{0}', steps.version.outputs.version) }} + tag_name: v${{ steps.version.outputs.version }} generate_release_notes: true files: build/libs/klag-${{ steps.version.outputs.version }}-fat.jar From f1c0e2e8e48eadcbe5d3f29bc9866db520d00cfb Mon Sep 17 00:00:00 2001 From: Aviv Dozorets Date: Sat, 30 May 2026 18:58:38 +0300 Subject: [PATCH 2/2] ci: drop v prefix and use generic tag-to-version handling Standardize on bare semver for both image tags and GitHub releases (no v prefix), and make version resolution work for any tag form. - trigger on klag-* and plain semver tags (drop the v* convention) - derive version by stripping any tag prefix (klag-, v) to the bare semver - release tag_name is the bare version, matching the image tag Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85b178f..dc73017 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,11 +2,11 @@ name: Release on: push: + # chart-releaser tags the chart as klag-; plain semver tags are + # also supported. Any tag triggers a build of the matching image. tags: - - 'v*' - # chart-releaser tags the Helm chart as klag-; build the image too - # so the appVersion image referenced by the chart always exists. - 'klag-*' + - '[0-9]+.[0-9]+.[0-9]+*' workflow_dispatch: inputs: version: @@ -42,13 +42,12 @@ jobs: - name: Extract version id: version run: | - if [[ "${{ github.event_name }}" == "push" && "${GITHUB_REF_NAME}" == klag-* ]]; then - # Chart tag (klag-): use appVersion from build.gradle.kts. - VERSION=$(grep -oP 'version\s*=\s*"\K[^"]+' build.gradle.kts) - elif [[ "${{ github.event_name }}" == "push" ]]; then - VERSION="${GITHUB_REF_NAME#v}" - elif [[ -n "${{ inputs.version }}" ]]; then + if [[ -n "${{ inputs.version }}" ]]; then VERSION="${{ inputs.version }}" + elif [[ "${{ github.event_name }}" == "push" ]]; then + # Strip any tag prefix (klag-, v, ...) leaving the bare semver. + VERSION="${GITHUB_REF_NAME##*-}" + VERSION="${VERSION#v}" else VERSION=$(grep -oP 'version\s*=\s*"\K[^"]+' build.gradle.kts) fi @@ -93,6 +92,6 @@ jobs: uses: softprops/action-gh-release@v2 with: name: Klag v${{ steps.version.outputs.version }} - tag_name: v${{ steps.version.outputs.version }} + tag_name: ${{ steps.version.outputs.version }} generate_release_notes: true files: build/libs/klag-${{ steps.version.outputs.version }}-fat.jar