Compare commits
14 Commits
c564063d20
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| bb12bac945 | |||
| 8f0e3978b9 | |||
| 1f9d754f61 | |||
| 51b3b980a3 | |||
| c39f11fda7 | |||
| 0a42bcebe0 | |||
| ac96359966 | |||
| 3bc3f4790d | |||
| e3c17ceaa0 | |||
| 068c6ef686 | |||
|
d5623bdf9c
|
|||
| e3f1ba4e0a | |||
|
4688810928
|
|||
| 646d0e4e0c |
+166
-191
@@ -9,10 +9,14 @@ on:
|
|||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: release-${{ github.repository }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_URL: http://gitea-http.gitea.svc.cluster.local:3000
|
GITEA_URL: http://gitea-http.gitea.svc.cluster.local:3000
|
||||||
RELEASE_TOKEN_FILE: /runner-secrets/release-token
|
RELEASE_TOKEN_FILE: /runner-secrets/release-token
|
||||||
GIT_CLIFF_VERSION: "2.11.0"
|
GIT_CLIFF_VERSION: "2.13.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
preconditions:
|
preconditions:
|
||||||
@@ -39,7 +43,7 @@ jobs:
|
|||||||
if: github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch
|
if: github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -83,213 +87,184 @@ jobs:
|
|||||||
OWNER=$(echo "${REPOSITORY}" | cut -d'/' -f1)
|
OWNER=$(echo "${REPOSITORY}" | cut -d'/' -f1)
|
||||||
REPO=$(echo "${REPOSITORY}" | cut -d'/' -f2)
|
REPO=$(echo "${REPOSITORY}" | cut -d'/' -f2)
|
||||||
API_URL="${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}"
|
API_URL="${GITEA_URL}/api/v1/repos/${OWNER}/${REPO}"
|
||||||
|
|
||||||
# Fallback to main if DEFAULT_BRANCH is empty
|
|
||||||
BASE_BRANCH="${DEFAULT_BRANCH:-main}"
|
BASE_BRANCH="${DEFAULT_BRANCH:-main}"
|
||||||
echo "Using base branch: ${BASE_BRANCH}"
|
echo "Using base branch: ${BASE_BRANCH}"
|
||||||
|
|
||||||
TITLE="chore(release): prepare for ${VERSION}"
|
TITLE="chore(release): prepare for ${VERSION}"
|
||||||
# Read CHANGES.md content and add note (jq --arg will handle JSON escaping)
|
|
||||||
CHANGES_CONTENT=$(cat CHANGES.md)
|
CHANGES_CONTENT=$(cat CHANGES.md)
|
||||||
PR_NOTE="**Note:** Please use **Squash Merge** when merging this PR."
|
PR_NOTE="**Note:** Please use **Squash Merge** when merging this PR."
|
||||||
DESCRIPTION="${CHANGES_CONTENT}"$'\n\n---\n\n'"${PR_NOTE}"
|
DESCRIPTION="${CHANGES_CONTENT}"$'\n\n---\n\n'"${PR_NOTE}"
|
||||||
|
|
||||||
echo "Checking for existing release PRs..."
|
|
||||||
PRS=$(curl -sf --retry 3 --retry-delay 2 --retry-connrefused \
|
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
"${API_URL}/pulls?state=open" | jq '[.[] | select(.head.ref == "next-release")]')
|
|
||||||
PR_INDEX=$(echo "${PRS}" | jq -r '.[0].number // empty')
|
|
||||||
|
|
||||||
# If PR exists, rebase the branch onto the latest base branch
|
|
||||||
if [ -n "${PR_INDEX}" ]; then
|
|
||||||
echo "Rebasing PR #${PR_INDEX} branch onto ${BASE_BRANCH}..."
|
|
||||||
REBASE_RESPONSE=$(curl -s --retry 3 --retry-delay 2 --retry-connrefused -w "\n%{http_code}" -X POST \
|
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
"${API_URL}/pulls/${PR_INDEX}/update?style=rebase")
|
|
||||||
REBASE_CODE=$(echo "${REBASE_RESPONSE}" | tail -1)
|
|
||||||
if [ "${REBASE_CODE}" = "200" ]; then
|
|
||||||
echo "Successfully rebased branch onto ${BASE_BRANCH}"
|
|
||||||
elif [ "${REBASE_CODE}" = "409" ]; then
|
|
||||||
echo "Branch already up to date or rebase conflict - continuing with update"
|
|
||||||
else
|
|
||||||
echo "Warning: Rebase returned ${REBASE_CODE}, continuing anyway"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Checking for existing next-release branch..."
|
|
||||||
BRANCH_CHECK=$(curl -s --retry 3 --retry-delay 2 --retry-connrefused -w "%{http_code}" -o /dev/null \
|
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
"${API_URL}/branches/next-release")
|
|
||||||
echo "Branch check HTTP status: ${BRANCH_CHECK}"
|
|
||||||
if [ "${BRANCH_CHECK}" = "200" ]; then
|
|
||||||
BRANCH_EXISTS="true"
|
|
||||||
else
|
|
||||||
BRANCH_EXISTS="false"
|
|
||||||
fi
|
|
||||||
echo "Branch exists: ${BRANCH_EXISTS}"
|
|
||||||
|
|
||||||
# Prepare CHANGELOG.md content
|
|
||||||
CHANGELOG_CONTENT=$(base64 -w0 < CHANGELOG.md)
|
CHANGELOG_CONTENT=$(base64 -w0 < CHANGELOG.md)
|
||||||
|
VERSION_CONTENT=$(jq -n --arg v "${VERSION}" '{"version":$v}' | base64 -w0)
|
||||||
|
|
||||||
# Prepare .version content
|
# api_call METHOD PATH [JSON_BODY]
|
||||||
VERSION_JSON=$(jq -n --arg v "${VERSION}" '{"version":$v}')
|
# Stdout: first line "<http_code>|<curl_rc>", then response body.
|
||||||
VERSION_CONTENT=$(echo "${VERSION_JSON}" | base64 -w0)
|
# Never returns non-zero so callers must inspect http_code; this
|
||||||
|
# prevents curl exit codes (e.g. CURLE_WRITE_ERROR / 23) from
|
||||||
if [ "${BRANCH_EXISTS}" = "true" ]; then
|
# killing the script via `set -e` inside command substitutions.
|
||||||
echo "Updating existing next-release branch..."
|
api_call() {
|
||||||
|
local method="$1" path="$2" data="${3:-}"
|
||||||
# Get SHA of existing CHANGELOG.md
|
local body_file http_code rc=0
|
||||||
CHANGELOG_SHA=$(curl -sf --retry 3 --retry-delay 2 --retry-connrefused \
|
body_file=$(mktemp)
|
||||||
-H "Authorization: token ${TOKEN}" \
|
local args=(-sS --retry 3 --retry-delay 2 --retry-all-errors
|
||||||
"${API_URL}/contents/CHANGELOG.md?ref=next-release" | jq -r '.sha // empty')
|
-w '%{http_code}'
|
||||||
|
-o "${body_file}"
|
||||||
# Update or create CHANGELOG.md
|
-X "${method}"
|
||||||
if [ -n "${CHANGELOG_SHA}" ]; then
|
-H "Authorization: token ${TOKEN}")
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X PUT \
|
if [ -n "${data}" ]; then
|
||||||
-H "Authorization: token ${TOKEN}" \
|
args+=(-H "Content-Type: application/json" --data "${data}")
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data "$(jq -n \
|
|
||||||
--arg content "${CHANGELOG_CONTENT}" \
|
|
||||||
--arg sha "${CHANGELOG_SHA}" \
|
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "next-release" \
|
|
||||||
'{content: $content, sha: $sha, message: $message, branch: $branch}')" \
|
|
||||||
"${API_URL}/contents/CHANGELOG.md"
|
|
||||||
else
|
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X POST \
|
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data "$(jq -n \
|
|
||||||
--arg content "${CHANGELOG_CONTENT}" \
|
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "next-release" \
|
|
||||||
'{content: $content, message: $message, branch: $branch, new_branch: $branch}')" \
|
|
||||||
"${API_URL}/contents/CHANGELOG.md"
|
|
||||||
fi
|
fi
|
||||||
|
http_code=$(curl "${args[@]}" "${API_URL}${path}" 2>/dev/null) || rc=$?
|
||||||
|
printf '%s|%s\n' "${http_code:-000}" "${rc}"
|
||||||
|
cat "${body_file}"
|
||||||
|
rm -f "${body_file}"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Get SHA of existing .version
|
# Extract first-line meta and remaining body from api_call output.
|
||||||
VERSION_SHA=$(curl -sf --retry 3 --retry-delay 2 --retry-connrefused \
|
meta_line() { printf '%s\n' "$1" | head -n1; }
|
||||||
-H "Authorization: token ${TOKEN}" \
|
body_lines() { printf '%s\n' "$1" | tail -n +2; }
|
||||||
"${API_URL}/contents/.version?ref=next-release" | jq -r '.sha // empty')
|
http_of() { local m; m=$(meta_line "$1"); printf '%s' "${m%%|*}"; }
|
||||||
|
ok_code() { [ -n "$1" ] && [ "$1" -ge 200 ] 2>/dev/null && [ "$1" -lt 400 ]; }
|
||||||
|
|
||||||
# Update or create .version
|
# Delete existing next-release branch if it exists (auto-closes any open PR)
|
||||||
if [ -n "${VERSION_SHA}" ]; then
|
echo "Checking for existing next-release branch..."
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X PUT \
|
OUT=$(api_call GET "/branches/next-release")
|
||||||
-H "Authorization: token ${TOKEN}" \
|
CODE=$(http_of "${OUT}")
|
||||||
-H "Content-Type: application/json" \
|
if [ "${CODE}" = "200" ]; then
|
||||||
--data "$(jq -n \
|
echo "Deleting existing next-release branch..."
|
||||||
--arg content "${VERSION_CONTENT}" \
|
OUT=$(api_call DELETE "/branches/next-release")
|
||||||
--arg sha "${VERSION_SHA}" \
|
echo " delete result: $(meta_line "${OUT}")"
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "next-release" \
|
|
||||||
'{content: $content, sha: $sha, message: $message, branch: $branch}')" \
|
|
||||||
"${API_URL}/contents/.version"
|
|
||||||
else
|
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X POST \
|
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data "$(jq -n \
|
|
||||||
--arg content "${VERSION_CONTENT}" \
|
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "next-release" \
|
|
||||||
'{content: $content, message: $message, branch: $branch}')" \
|
|
||||||
"${API_URL}/contents/.version"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "Creating new next-release branch from ${BASE_BRANCH}..."
|
echo " no existing branch (HTTP ${CODE})"
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if CHANGELOG.md exists on base branch to determine create vs update
|
# Explicitly create next-release branch from base
|
||||||
CHANGELOG_SHA=$(curl -sf --retry 3 --retry-delay 2 --retry-connrefused \
|
echo "Creating next-release branch from ${BASE_BRANCH}..."
|
||||||
-H "Authorization: token ${TOKEN}" \
|
BRANCH_PAYLOAD=$(jq -n --arg new "next-release" --arg old "${BASE_BRANCH}" \
|
||||||
"${API_URL}/contents/CHANGELOG.md?ref=${BASE_BRANCH}" | jq -r '.sha // empty')
|
'{new_branch_name: $new, old_branch_name: $old}')
|
||||||
|
for i in $(seq 1 5); do
|
||||||
if [ -n "${CHANGELOG_SHA}" ]; then
|
OUT=$(api_call POST "/branches" "${BRANCH_PAYLOAD}")
|
||||||
echo "Updating CHANGELOG.md (exists on ${BASE_BRANCH}) on new branch..."
|
META=$(meta_line "${OUT}"); BODY=$(body_lines "${OUT}"); CODE="${META%%|*}"
|
||||||
RESPONSE=$(curl -s --retry 3 --retry-delay 2 --retry-connrefused -w "\n%{http_code}" -X PUT \
|
if ok_code "${CODE}"; then
|
||||||
-H "Authorization: token ${TOKEN}" \
|
echo "Branch created (${META})"
|
||||||
-H "Content-Type: application/json" \
|
break
|
||||||
--data "$(jq -n \
|
|
||||||
--arg content "${CHANGELOG_CONTENT}" \
|
|
||||||
--arg sha "${CHANGELOG_SHA}" \
|
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "${BASE_BRANCH}" \
|
|
||||||
--arg new_branch "next-release" \
|
|
||||||
'{content: $content, sha: $sha, message: $message, branch: $branch, new_branch: $new_branch}')" \
|
|
||||||
"${API_URL}/contents/CHANGELOG.md")
|
|
||||||
else
|
|
||||||
echo "Creating CHANGELOG.md on new branch..."
|
|
||||||
RESPONSE=$(curl -s --retry 3 --retry-delay 2 --retry-connrefused -w "\n%{http_code}" -X POST \
|
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data "$(jq -n \
|
|
||||||
--arg content "${CHANGELOG_CONTENT}" \
|
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "${BASE_BRANCH}" \
|
|
||||||
--arg new_branch "next-release" \
|
|
||||||
'{content: $content, message: $message, branch: $branch, new_branch: $new_branch}')" \
|
|
||||||
"${API_URL}/contents/CHANGELOG.md")
|
|
||||||
fi
|
fi
|
||||||
HTTP_CODE=$(echo "${RESPONSE}" | tail -1)
|
if [ "${i}" = "5" ]; then
|
||||||
BODY=$(echo "${RESPONSE}" | sed '$d')
|
echo "Branch create failed after 5 attempts (${META}): ${BODY}"
|
||||||
if [ "${HTTP_CODE}" -ge 400 ]; then
|
|
||||||
echo "Error with CHANGELOG.md: ${BODY}"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo " attempt ${i}/5 (${META}): ${BODY} — retrying..."
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
|
||||||
# Check if .version exists on base branch
|
# Poll until branch is readable
|
||||||
VERSION_SHA=$(curl -sf --retry 3 --retry-delay 2 --retry-connrefused \
|
echo "Waiting for branch readiness..."
|
||||||
-H "Authorization: token ${TOKEN}" \
|
for i in $(seq 1 10); do
|
||||||
"${API_URL}/contents/.version?ref=${BASE_BRANCH}" | jq -r '.sha // empty')
|
OUT=$(api_call GET "/branches/next-release")
|
||||||
|
META=$(meta_line "${OUT}"); CODE="${META%%|*}"
|
||||||
if [ -n "${VERSION_SHA}" ]; then
|
if [ "${CODE}" = "200" ]; then
|
||||||
echo "Updating .version on next-release branch..."
|
echo "Branch ready after ${i} attempt(s)"
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X PUT \
|
break
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data "$(jq -n \
|
|
||||||
--arg content "${VERSION_CONTENT}" \
|
|
||||||
--arg sha "${VERSION_SHA}" \
|
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "next-release" \
|
|
||||||
'{content: $content, sha: $sha, message: $message, branch: $branch}')" \
|
|
||||||
"${API_URL}/contents/.version"
|
|
||||||
else
|
|
||||||
echo "Creating .version on next-release branch..."
|
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X POST \
|
|
||||||
-H "Authorization: token ${TOKEN}" \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data "$(jq -n \
|
|
||||||
--arg content "${VERSION_CONTENT}" \
|
|
||||||
--arg message "${TITLE}" \
|
|
||||||
--arg branch "next-release" \
|
|
||||||
'{content: $content, message: $message, branch: $branch}')" \
|
|
||||||
"${API_URL}/contents/.version"
|
|
||||||
fi
|
fi
|
||||||
fi
|
if [ "${i}" = "10" ]; then
|
||||||
|
echo "Branch not ready after 10 attempts (last: ${META})"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo " attempt ${i}/10 (${META}) — waiting..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
if [ -n "${PR_INDEX}" ]; then
|
# Fetch file blob SHA from BASE_BRANCH. next-release was just forked
|
||||||
echo "Updating existing PR #${PR_INDEX}..."
|
# from base so the blob SHA matches; querying base avoids racing
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X PATCH \
|
# Gitea's per-endpoint propagation for the new branch (the /contents
|
||||||
-H "Authorization: token ${TOKEN}" \
|
# endpoint can still 500/404 after /branches reports 200). Returns
|
||||||
-H "Content-Type: application/json" \
|
# empty only when the file genuinely does not exist on base.
|
||||||
--data "$(jq -n \
|
fetch_sha() {
|
||||||
--arg title "${TITLE}" \
|
local path="$1" out meta code body
|
||||||
--arg body "${DESCRIPTION}" \
|
for i in $(seq 1 5); do
|
||||||
'{title: $title, body: $body}')" \
|
out=$(api_call GET "/contents/${path}?ref=${BASE_BRANCH}")
|
||||||
"${API_URL}/pulls/${PR_INDEX}"
|
meta=$(meta_line "${out}"); code="${meta%%|*}"; body=$(body_lines "${out}")
|
||||||
else
|
if [ "${code}" = "200" ]; then
|
||||||
echo "Creating new PR..."
|
printf '%s' "${body}" | jq -r '.sha // empty'
|
||||||
curl -sf --retry 3 --retry-delay 2 --retry-connrefused -X POST \
|
return 0
|
||||||
-H "Authorization: token ${TOKEN}" \
|
fi
|
||||||
-H "Content-Type: application/json" \
|
if [ "${code}" = "404" ]; then
|
||||||
--data "$(jq -n \
|
return 0
|
||||||
--arg title "${TITLE}" \
|
fi
|
||||||
--arg body "${DESCRIPTION}" \
|
if [ "${i}" = "5" ]; then
|
||||||
--arg head "next-release" \
|
echo "fetch_sha ${path} failed after 5 attempts (${meta}): ${body}" >&2
|
||||||
--arg base "${DEFAULT_BRANCH}" \
|
return 0
|
||||||
'{title: $title, body: $body, head: $head, base: $base}')" \
|
fi
|
||||||
"${API_URL}/pulls"
|
sleep 2
|
||||||
fi
|
done
|
||||||
|
}
|
||||||
|
CHANGELOG_SHA=$(fetch_sha "CHANGELOG.md")
|
||||||
|
VERSION_SHA=$(fetch_sha ".version")
|
||||||
|
|
||||||
|
# Write file with retry. Args: PATH CONTENT_B64 [SHA]
|
||||||
|
write_file() {
|
||||||
|
local path="$1" content="$2" sha="${3:-}"
|
||||||
|
local method payload out meta body code
|
||||||
|
if [ -n "${sha}" ]; then
|
||||||
|
method=PUT
|
||||||
|
payload=$(jq -n \
|
||||||
|
--arg content "${content}" \
|
||||||
|
--arg sha "${sha}" \
|
||||||
|
--arg message "${TITLE}" \
|
||||||
|
--arg branch "next-release" \
|
||||||
|
'{content: $content, sha: $sha, message: $message, branch: $branch}')
|
||||||
|
else
|
||||||
|
method=POST
|
||||||
|
payload=$(jq -n \
|
||||||
|
--arg content "${content}" \
|
||||||
|
--arg message "${TITLE}" \
|
||||||
|
--arg branch "next-release" \
|
||||||
|
'{content: $content, message: $message, branch: $branch}')
|
||||||
|
fi
|
||||||
|
for i in $(seq 1 5); do
|
||||||
|
out=$(api_call "${method}" "/contents/${path}" "${payload}")
|
||||||
|
meta=$(meta_line "${out}"); body=$(body_lines "${out}"); code="${meta%%|*}"
|
||||||
|
if ok_code "${code}"; then
|
||||||
|
echo "${path} write succeeded (${meta})"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ "${i}" = "5" ]; then
|
||||||
|
echo "${path} write failed after 5 attempts (${meta}): ${body}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo " ${path} attempt ${i}/5 (${meta}): ${body} — retrying..."
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Writing CHANGELOG.md to next-release..."
|
||||||
|
write_file "CHANGELOG.md" "${CHANGELOG_CONTENT}" "${CHANGELOG_SHA}"
|
||||||
|
echo "Writing .version to next-release..."
|
||||||
|
write_file ".version" "${VERSION_CONTENT}" "${VERSION_SHA}"
|
||||||
|
|
||||||
|
# Create PR
|
||||||
|
echo "Creating PR..."
|
||||||
|
PR_DATA=$(jq -n \
|
||||||
|
--arg title "${TITLE}" \
|
||||||
|
--arg body "${DESCRIPTION}" \
|
||||||
|
--arg head "next-release" \
|
||||||
|
--arg base "${BASE_BRANCH}" \
|
||||||
|
'{title: $title, body: $body, head: $head, base: $base}')
|
||||||
|
for i in $(seq 1 5); do
|
||||||
|
OUT=$(api_call POST "/pulls" "${PR_DATA}")
|
||||||
|
META=$(meta_line "${OUT}"); BODY=$(body_lines "${OUT}"); CODE="${META%%|*}"
|
||||||
|
if ok_code "${CODE}"; then
|
||||||
|
echo "PR created (${META})"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ "${i}" = "5" ]; then
|
||||||
|
echo "PR creation failed after 5 attempts (${META}): ${BODY}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo " PR attempt ${i}/5 (${META}): ${BODY} — retrying..."
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
@@ -301,7 +276,7 @@ jobs:
|
|||||||
inputs.tag_only != true
|
inputs.tag_only != true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -368,7 +343,7 @@ jobs:
|
|||||||
inputs.tag_only == true
|
inputs.tag_only == true
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -6,7 +6,9 @@
|
|||||||
"customManagers": [
|
"customManagers": [
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"fileMatch": ["^\\.gitea/workflows/.*\\.ya?ml$"],
|
"managerFilePatterns": [
|
||||||
|
"/^\\.gitea/workflows/.*\\.ya?ml$/"
|
||||||
|
],
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"GIT_CLIFF_VERSION:\\s*[\"']?(?<currentValue>[^\"'\\s]+)[\"']?"
|
"GIT_CLIFF_VERSION:\\s*[\"']?(?<currentValue>[^\"'\\s]+)[\"']?"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user