CD pipeline fails on any fork push — pre-release job requires tags that forking doesn't copy
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
What happens
Any push to develop/master on a fork of this repo triggers cd.yml, and the pre-release job fails immediately:
LATEST_TAG=$(git tag -l 'v[0-9]*.[0-9]*.[0-9]*' --sort=-version:refname | grep -v '-' | head -1)
::error::No stable release tag found
Why
Forking a repo doesn't copy tags, and a plain git fetch/gh repo sync on a fork doesn't pull them either — so any fork ends up with zero v*.*.* tags. The pre-release job's version-computation step hard-requires at least one, so it can never succeed on a fork, regardless of what the push actually contains. I hit this simply by adding an unrelated workflow file to my fork's develop branch — first push, immediate red X.
The rest of the pipeline (build-prerelease, release-please, build-release, update-latest-tag) already cascades to skipped correctly once its needs.*.outputs are empty — only the two entry-point jobs (pre-release, release-please) actually attempt to run and fail on a fork.
Suggested fix
Guard both entry-point jobs in cd.yml with github.repository_owner == 'rtk-ai' (or equivalent), so the release/CD pipeline only ever runs on this repo, not on forks. Verified locally on my own fork that this fully resolves it — the same push that previously failed reports skipped instead, with no behavior change on the real repo (the added condition is already true there).
Happy to open a PR with this change if that's the preferred way to receive it — wanted to check first since I wasn't sure whether CI/workflow changes go through issues first here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cd.yml by inspecting the pre-release and release-please entry-point jobs and their existing conditions. Add the repository-owner guard to both, then verify that pushes from forks skip those jobs while pushes in the rtk-ai repository retain the current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100