From 76355a6b67a9f8f2c4a4e684e16c064e248f5189 Mon Sep 17 00:00:00 2001 From: Djeex Date: Sat, 22 Aug 2026 15:48:31 +0200 Subject: [PATCH] Create a Gitea release for every published image --- .gitea/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8faeb8d..b0bba3b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -119,4 +119,13 @@ jobs: docker tag adguard-cidre:ci "$IMAGE:$VERSION" docker push "$IMAGE:latest" docker push "$IMAGE:$MINOR_TAG" - docker push "$IMAGE:$VERSION" \ No newline at end of file + docker push "$IMAGE:$VERSION" + + CHANGED_LIST=$(echo "$CHANGED" | tr '\n' ',' | sed 's/,$//' | sed 's/,/, /g') + BODY="Automated release. Image: ${IMAGE}:${VERSION}. Changed files: ${CHANGED_LIST}" + + curl -s -o /dev/null -w "Release API response: %{http_code}\n" -X POST \ + -H "Authorization: token ${{ secrets.CI_PUSH_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\": \"${VERSION}\", \"name\": \"${VERSION}\", \"target_commitish\": \"main\", \"body\": \"${BODY}\"}" \ + "https://git.djeex.fr/api/v1/repos/Djeex/adguard-cidre/releases" \ No newline at end of file