fix: handle CHANGELOG.md existing on default branch
This commit is contained in:
@@ -80,7 +80,10 @@ handle_mr:
|
||||
# Check if CHANGELOG.md exists
|
||||
if curl -sf --head \
|
||||
-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=${CI_DEFAULT_BRANCH}" || \
|
||||
curl -sf --head \
|
||||
-H "Authorization: Bearer ${UNBOUND_RELEASE_TOKEN}" \
|
||||
"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/repository/files/CHANGELOG%2Emd?ref=next-release"; then
|
||||
# Exists => update
|
||||
curl -sf -X PUT \
|
||||
-H "Authorization: Bearer ${UNBOUND_RELEASE_TOKEN}" \
|
||||
|
||||
Reference in New Issue
Block a user