From fafda14fe947e09a77f5faae515c7e6f4d6f33e1 Mon Sep 17 00:00:00 2001 From: Matthias Hinrichs Date: Sat, 9 May 2026 15:04:20 +0200 Subject: [PATCH] refactor: improve Docker image pull string construction in Gitea CI workflow using jq arguments --- .gitea/workflows/cicd.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/cicd.yml b/.gitea/workflows/cicd.yml index 3c5b6b3..cd1b291 100644 --- a/.gitea/workflows/cicd.yml +++ b/.gitea/workflows/cicd.yml @@ -103,9 +103,8 @@ jobs: # Check if Docker Image section already exists if [[ "$OLD_BODY" != *"## 🐳 Docker Image"* ]]; then - NEW_BODY="${OLD_BODY}\n\n## 🐳 Docker Image\n\`\`\`bash\ndocker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG_NAME}\n\`\`\`" - - jq -n --arg body "$NEW_BODY" '{body: $body}' | \ + jq -n --arg old "$OLD_BODY" --arg img "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG_NAME}" \ + '{body: ($old + "\n\n## 🐳 Docker Image\n```bash\ndocker pull " + $img + "\n```")}' | \ curl -s -X PATCH \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Content-Type: application/json" \