]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
.gitlab-ci.yml: docker:dockerhub: avoid SIGPIPE docs-develop-v5-c-ww5d56/deployments/9496
authorAleš Mrázek <ales.mrazek@nic.cz>
Tue, 7 Jul 2026 11:33:30 +0000 (13:33 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Tue, 7 Jul 2026 11:33:30 +0000 (13:33 +0200)
Replaced the piped 'git tag | head' command with 'git for-each-ref'
to avoid intermittent exit code 141 failures in CI.

.gitlab-ci.yml

index 602e2e65b4f7375ee45b5feca388e457a2fb5b5b..ede38607d99f41cc10dfefeebdd00b5561b1f1d8 100644 (file)
@@ -262,7 +262,10 @@ docker:dockerhub:
   before_script:
     - git fetch --tags --force
     - >
-      LATEST5_TAG=$(git tag --list 'v5*' --sort=-v:refname | head -n 1)
+      LATEST_TAG=$(git for-each-ref \
+        --sort=-version:refname \
+        --count=1 \
+        --format='%(refname:short)' refs/tags)
 
       echo "Latest tag: $LATEST_TAG"
       echo "Current: $CI_COMMIT_REF_NAME"