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