Check if there is a new release of OpenCode and update the version in agents/Makefile (single source of truth) if a newer version is available.
- CronTask: Weekly Monday at 9:00 UTC (
deploy/crontask-opencode-update.yaml) - Manual:
check opencode update,update opencode version
-
Navigate to the cloned
kubeopencodedirectory -
Read current version from
agents/Makefile(single source of truth):grep 'OPENCODE_VERSION' agents/Makefile -
Fetch latest release from GitHub:
curl -s https://api.github.com/repos/anomalyco/opencode/releases/latest | jq -r '.tag_name'
-
Compare versions (strip
vprefix from GitHub version):- If same → exit successfully with "OpenCode is already up to date"
- If newer → proceed to Phase 2
- Update the
OPENCODE_VERSION ?= x.y.zline inagents/Makefile - No other changes to the file
git checkout -b chore/bump-opencode-<version>
git add agents/Makefile
git commit -s -m "chore(agents): bump opencode version to <version>"
git push -u origin HEAD
gh pr create \
--title "chore(agents): bump opencode version to <version>" \
--body "Bumps OpenCode from <old-version> to <new-version>.
Release: https://github.com/anomalyco/opencode/releases/tag/v<new-version>
---
_Automated by kubeopencode-agent_"- Only update if there is actually a newer version
- Do not make any other changes to the Makefile
- Use the exact version number from the GitHub release (without
vprefix)