From f9f1499e8857435b3bb7553de710228e01e2ef6a Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Sat, 21 Sep 2024 10:03:13 +0800 Subject: [PATCH 1/2] Fix jq query - should address the following error condition: jq: error: count/0 is not defined at , line 1: .meta.total-count jq: 1 compile error Argument "" isn't numeric in numeric gt (>) at /usr/local/bin/tfc-dump.pl line 165. --- tfc-dump.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfc-dump.pl b/tfc-dump.pl index 53c034c..81f1149 100755 --- a/tfc-dump.pl +++ b/tfc-dump.pl @@ -158,7 +158,7 @@ # Get the number of Variable Sets -$jq_cmd = "cat $tmpfile | jq '.meta.total-count'"; +$jq_cmd = "cat $tmpfile | jq '.meta.pagination[\"total-count\"]'"; $total_count = `$jq_cmd`; unlink($tmpfile); From 283b005be8ac161061b3a65257cb3d87e0eb98a0 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Sat, 21 Sep 2024 10:06:23 +0800 Subject: [PATCH 2/2] add a semantic version tag to the Docker image --- .github/workflows/build-and-publish.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 4237f6f..fbc0976 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -23,9 +23,10 @@ jobs: with: images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }} tags: | - type=ref,event=branch - type=ref,event=tag - # set latest tag for master branch + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + # set 'latest' tag for main branch type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - name: Build and push Docker image