Two fixes for intermittent release workflow failures:
- **Use `BASE_BRANCH` instead of `DEFAULT_BRANCH`** for the PR `base` field — `BASE_BRANCH` has a `:-main` fallback, preventing an empty base from causing a 404
- **Replace fixed `sleep 3` with proper polling and retry** — polls for branch readiness (up to 10 attempts) before creating the PR, then retries PR creation (up to 5 attempts) with backoff
Fixes the `Error creating PR (HTTP 404)` seen when Gitea hasn't fully indexed the `next-release` branch by the time the PR creation request fires.
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
Reviewed-on: #19
The PR creation curl immediately follows branch creation via the Contents
API, but Gitea may not have fully indexed the new branch for pull request
operations yet. This causes intermittent HTTP errors on the first run.
- Add sleep 3 before PR creation to allow Gitea to process the new branch
- Use --retry-all-errors so curl retries on HTTP 4xx/5xx (not just
connection failures)
- Capture and display the actual HTTP error code and response body on
failure for easier debugging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete and recreate the next-release branch from base on each run instead of
rebasing, which caused 409 conflicts on CHANGELOG.md. Add concurrency group
to prevent parallel workflow runs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add --retry 3 --retry-delay 2 --retry-connrefused to all Gitea API
curl calls to handle transient connection failures. This addresses
intermittent exit code 7 (connection refused) errors when the K8s
internal service briefly drops connections.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When updating an existing release PR, the workflow now rebases
the next-release branch onto the base branch using Gitea's PR
update API with style=rebase. This keeps the PR up to date with
main without force-pushing or deleting the branch.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds fallback to main branch if DEFAULT_BRANCH is empty and updates
the way CHANGELOG.md and .version files are handled in the release
process. Refactors checks for existing branches and includes
detailed logging for transparency. This improves the robustness of
the release workflow and ensures relevant files are created or
updated correctly.
- Run directly on ubuntu-latest instead of custom containers
- Download git-cliff binary from GitHub releases
- Merge changelog and handle-pr into single job
- Make create-release and create-tag self-contained
- Remove upload-artifact and download-artifact (not supported on GHES/Gitea)
- Add Renovate custom manager for automatic git-cliff updates
- Run directly on ubuntu-latest instead of custom containers
- Download git-cliff binary from GitHub releases
- Add Renovate custom manager for automatic git-cliff updates