ci: single-source the Hugo version (.hugoversion) + auto-bump (closes #15)#22
Merged
Merged
Conversation
#15) HUGO_VERSION was hardcoded independently in ci.yml and deploy.yml, so the two could silently drift — CI validating with a different Hugo than production deploys. - .hugoversion: the single source of truth (just the version string). - ci.yml + deploy.yml: read it in-step (`HUGO_VERSION="$(cat .hugoversion)"`) instead of a literal env, so drift is impossible by construction. deploy.yml's build job is reordered to checkout before installing Hugo (the file must exist first). Reading locally in the run block (not via $GITHUB_ENV) keeps it clear of the github-env injection class. - hugo-bump.yml: weekly scheduled job (+ workflow_dispatch) that checks for a newer Hugo release and opens a PR editing .hugoversion (Dependabot can't track a wget'd .deb). Manual bump is just editing the file. - README: document .hugoversion as the single source. Verified locally: prettier/markdownlint clean, zizmor clean (incl. the new workflow), version read resolves to 0.162.1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #15.
HUGO_VERSIONwas hardcoded independently inci.yml(0.162.1) anddeploy.yml(0.162.1) — they could silently drift, so CI could validate with a different Hugo than production deploys.What this does
.hugoversion— one file, just the version string. The single source of truth.ci.yml+deploy.ymlread it in-step (HUGO_VERSION="$(cat .hugoversion)") instead of a literalenv, so drift is impossible by construction.deploy.yml's build job is reordered to checkout before installing Hugo (the file has to exist first). Reading locally in the run block — not via$GITHUB_ENV— keeps it clear of the github-env injection class (zizmor stays clean).hugo-bump.yml— a weekly scheduled job (+workflow_dispatch) that checksgohugoio/hugofor a newer release and opens a PR editing.hugoversion(Dependabot can't track awget'd.deb). Manual bump = just edit the file..hugoversionas the single source.Acceptance (#15)
Verified
cat .hugoversion→0.162.1zizmor .github/workflows/→ no findings (incl. the new bump workflow)🤖 Generated with Claude Code