From 918d64d6cf61492a0661efefab452e941b254151 Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Wed, 30 Jul 2025 12:02:12 +0200 Subject: [PATCH] switch to semver so that renovate is happy --- .gitea/workflows/build_container.yaml | 17 ++++++++++++++++- renovate.json5 | 14 -------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/build_container.yaml b/.gitea/workflows/build_container.yaml index 47ba0ac..de54a15 100644 --- a/.gitea/workflows/build_container.yaml +++ b/.gitea/workflows/build_container.yaml @@ -16,6 +16,19 @@ jobs: - uses: https://gitea.com/actions/checkout@v4 + - name: Fetch tags from main branch + id: version + run: | + git fetch origin main --tags + LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) + # remove the 'v' prefix from the tag name + echo "BUILD_NAME=${LATEST_TAG//v}" >> $GITHUB_OUTPUT + + - name: Output the version that is being used + run: | + echo "Building for version ${{ steps.version.outputs.BUILD_NAME }}" + + - name: Login to Docker Registry uses: docker/login-action@v3 with: @@ -23,6 +36,8 @@ jobs: username: ${{ gitea.repository_owner }} password: ${{ secrets.PACKAGE_REGISTRY_ACCESS }} + + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -31,5 +46,5 @@ jobs: with: context: . # use the current commit SHA as the tag - tags: git.kluster.moll.re/remoll/journal-bot:${{ gitea.sha }} + tags: git.kluster.moll.re/remoll/journal-bot:${{ steps.version.outputs.BUILD_NAME }}-${{ gitea.run_number }} push: true diff --git a/renovate.json5 b/renovate.json5 index f553deb..8c084eb 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,18 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "dependencyDashboard": true, - "regexManagers": [ - { - "fileMatch": ["kustomization\\.yaml"], - "matchStrings": [ - "- name:\\s*(?\\S+)\\s*\\n\\s*newName:\\s*(?\\S+)\\s*\\n\\s*newTag:\\s*(?[a-f0-9]{7,40})" - ], - "datasourceTemplate": "docker", - "versioningTemplate": "loose", - "extractVersionTemplate": "{{ currentValue }}", - "lookupNameTemplate": "{{ lookupName }}" - }, - ], "packageRules": [ // Fully automatically update the container version referenced in the deployment { @@ -24,8 +12,6 @@ "registryUrls": [ "https://git.kluster.moll.re" ], - // Since the images use the commit sha as their tag, simply match any tag - "versioning": "regex:(.*)" } ], }