fix: handle CHANGELOG.md existing on default branch

This commit is contained in:
2024-10-06 12:15:40 +02:00
parent 01507626b9
commit 22294d5322
+3
View File
@@ -79,6 +79,9 @@ handle_mr:
"${BODY_TMPL}")" "${BODY_TMPL}")"
# Check if CHANGELOG.md exists # Check if CHANGELOG.md exists
if curl -sf --head \ if curl -sf --head \
-H "Authorization: Bearer ${UNBOUND_RELEASE_TOKEN}" \
"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/repository/files/CHANGELOG%2Emd?ref=${CI_DEFAULT_BRANCH}" || \
curl -sf --head \
-H "Authorization: Bearer ${UNBOUND_RELEASE_TOKEN}" \ -H "Authorization: Bearer ${UNBOUND_RELEASE_TOKEN}" \
"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/repository/files/CHANGELOG%2Emd?ref=next-release"; then "https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/repository/files/CHANGELOG%2Emd?ref=next-release"; then
# Exists => update # Exists => update