Skip to content

chore: add release workflow and version-aware Docker image tags - #30

Merged
IceCodeNew merged 1 commit into
masterfrom
chore/version-0.3.0
Jul 15, 2026
Merged

chore: add release workflow and version-aware Docker image tags#30
IceCodeNew merged 1 commit into
masterfrom
chore/version-0.3.0

Conversation

@IceCodeNew

@IceCodeNew IceCodeNew commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Changes

  • Docker image now tagged with both :latest and :VERSION (hardcoded in image.yml)
  • New .github/workflows/release.yml: manual workflow_dispatch with version input

Release workflow

  1. Triggered manually from Actions tab with version number (X.Y.Z)
  2. Updates pyproject.toml, __init__.py, image.yml with the new version
  3. Runs uv lock to sync lockfile
  4. Creates annotated git tag and pushes to master

Summary by CodeRabbit

  • New Features

    • Added a manual release workflow for validating semantic versions and publishing tagged releases.
    • Container images are now published with both latest and version-specific tags.
  • Chores

    • Release automation now keeps project and container image versions synchronized.
    • Automated releases update dependency lock information and publish the corresponding source tag.

@IceCodeNew

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@IceCodeNew, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7c47f3ad-4113-4f93-9324-892b22a672c6

📥 Commits

Reviewing files that changed from the base of the PR and between 523e788 and 138ef8a.

📒 Files selected for processing (2)
  • .github/workflows/image.yml
  • .github/workflows/release.yml
📝 Walkthrough

Walkthrough

The pull request adds a manual release workflow for synchronized semantic version updates and changes Docker image publishing to produce both latest and version-specific tags.

Changes

Release and image versioning

Layer / File(s) Summary
Release version automation
.github/workflows/release.yml
Adds manual semantic-version validation, project and workflow version updates, lockfile regeneration, commit and tag creation, and authenticated pushes.
Versioned image publishing
.github/workflows/image.yml
Adds WEATHER_BRIEFING_VERSION and publishes multi-architecture manifests with both latest and version-specific tags.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Maintainer
  participant ReleaseWorkflow
  participant Repository
  participant GitRemote
  Maintainer->>ReleaseWorkflow: Submit X.Y.Z version
  ReleaseWorkflow->>Repository: Update project and workflow versions
  ReleaseWorkflow->>Repository: Run uv lock and commit changes
  ReleaseWorkflow->>GitRemote: Push master branch and annotated tag
Loading
sequenceDiagram
  participant ImageWorkflow
  participant Buildx
  participant ContainerRegistry
  ImageWorkflow->>Buildx: Create multi-architecture manifest
  Buildx->>ContainerRegistry: Push latest image tag
  Buildx->>ContainerRegistry: Push version-specific image tag
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: a release workflow and versioned Docker image tags.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/version-0.3.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@IceCodeNew

Copy link
Copy Markdown
Owner Author

@copilot review this PR

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.49%. Comparing base (8e449c0) to head (f0baf3f).
⚠️ Report is 3 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #30   +/-   ##
=======================================
  Coverage   99.49%   99.49%           
=======================================
  Files          39       39           
  Lines        5506     5506           
  Branches      319      319           
=======================================
  Hits         5478     5478           
  Misses         17       17           
  Partials       11       11           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI commented Jul 15, 2026

Copy link
Copy Markdown

@copilot review this PR

Two bugs fixed in release.yml (commit fix(release): fetch tags before idempotency check, narrow rev-parse to refs/tags/):

  1. Shallow clone breaks the idempotency guardactions/checkout defaults to fetch-depth: 1 and skips pre-existing tags. git rev-parse "${WEATHER_BRIEFING_VERSION}" therefore couldn't see a tag created on an earlier commit, so a second run would try to re-push the same tag and fail. Fixed by adding fetch-tags: true to the checkout step.

  2. Ambiguous git rev-parse target — without a refs/tags/ namespace prefix the command also resolves branch names, commit SHAs, and tree objects. A branch named 0.3.0 would silently skip tag creation. Fixed by changing the check to git rev-parse "refs/tags/${WEATHER_BRIEFING_VERSION}".

Everything else looks good:

  • Least-privilege permissions (contents: write scoped to the job only, {} at workflow level) ✓
  • persist-credentials: false + explicit token injection avoids lingering credential leakage ✓
  • Version extracted from pyproject.toml at runtime rather than being a hardcoded workflow input ✓
  • workflow_dispatch for manual backfills ✓

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the weather-briefing project version to 0.3.0 and aligns release automation around that version, including publishing Docker images tagged as both latest and the exact version, plus adding a GitHub Actions workflow to create git tags on version bumps.

Changes:

  • Bump project version from 0.2.0 to 0.3.0 across pyproject.toml, package __init__, and uv.lock.
  • Update the container multi-arch manifest publish step to tag images as both :latest and :0.3.0.
  • Add a release.yml workflow that reads the version from pyproject.toml and creates an annotated git tag.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
weather_briefing/init.py Bumps the runtime package __version__ to 0.3.0.
uv.lock Updates the lockfile’s editable package version to 0.3.0.
pyproject.toml Bumps the project version to 0.3.0.
.github/workflows/release.yml Adds an automated release-tagging workflow on version bumps.
.github/workflows/image.yml Publishes multi-arch images with both latest and version tags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml Outdated
@IceCodeNew
IceCodeNew force-pushed the chore/version-0.3.0 branch 3 times, most recently from 54c1ca1 to 523e788 Compare July 15, 2026 09:20
@IceCodeNew IceCodeNew changed the title chore: bump version to 0.3.0 chore: add release workflow and version-aware Docker image tags Jul 15, 2026
@IceCodeNew
IceCodeNew marked this pull request as ready for review July 15, 2026 09:22
@IceCodeNew

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

49-51: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Handle empty commits to prevent workflow crashes.

If the workflow is accidentally rerun for an already-bumped version (or if the files are already up-to-date), git commit will fail because there are no staged changes, crashing the workflow. Adding a check avoids this failure.

♻️ Proposed refactor
           git add pyproject.toml weather_briefing/__init__.py .github/workflows/image.yml uv.lock
-          git commit -m "chore: bump version to ${VERSION}"
+          if ! git diff --cached --quiet; then
+            git commit -m "chore: bump version to ${VERSION}"
+          else
+            echo "No changes to commit, proceeding to tag."
+          fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 49 - 51, Update the release
workflow’s version-bump commit step to tolerate cases where the staged files
have no changes, so rerunning an already-completed version bump does not fail.
Guard the git commit after the existing `git add` using a staged-change check,
while preserving the current commit message and file list when changes are
present.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 13-14: Restrict the release job identified by release to execute
only when the workflow runs on the master branch, using the job-level condition
while preserving its existing runs-on configuration and release steps.
- Around line 45-59: Update the release workflow’s git remote authentication and
push commands to use a configured Personal Access Token secret instead of the
default GITHUB_TOKEN. Ensure the token is exposed through the workflow
environment and used by the remote URL so both the master push and version tag
push trigger downstream workflows such as image.yml.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 49-51: Update the release workflow’s version-bump commit step to
tolerate cases where the staged files have no changes, so rerunning an
already-completed version bump does not fail. Guard the git commit after the
existing `git add` using a staged-change check, while preserving the current
commit message and file list when changes are present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eddf706e-1fc5-4ae4-8d5e-6ef54f2f05e5

📥 Commits

Reviewing files that changed from the base of the PR and between 022a945 and 523e788.

📒 Files selected for processing (2)
  • .github/workflows/image.yml
  • .github/workflows/release.yml

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml Outdated
@IceCodeNew
IceCodeNew force-pushed the chore/version-0.3.0 branch 2 times, most recently from 69f2daf to ceb3c25 Compare July 15, 2026 09:31
- Docker image now tagged with both :latest and :VERSION
- New release workflow (manual workflow_dispatch) updates
  pyproject.toml, __init__.py, image.yml, uv.lock,
  creates a git tag, and pushes to master
@IceCodeNew
IceCodeNew force-pushed the chore/version-0.3.0 branch from ceb3c25 to 138ef8a Compare July 15, 2026 09:36
@IceCodeNew
IceCodeNew merged commit 9866640 into master Jul 15, 2026
5 checks passed
@IceCodeNew
IceCodeNew deleted the chore/version-0.3.0 branch July 15, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants