Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughA new GitHub Actions workflow file has been added at 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.github/workflows/publish-tb-cli.yml (1)
23-23: Consider updating Docker action majors to current stable.
docker/setup-buildx-action@v3anddocker/login-action@v3are valid, but moving to current major reduces drift and future maintenance pressure.Suggested update
- - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 ... - - name: Login to GHCR - uses: docker/login-action@v3 + - name: Login to GHCR + uses: docker/login-action@v4Also applies to: 26-26
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/publish-tb-cli.yml at line 23, Update the Docker GitHub Actions to their current stable major versions: replace usages of docker/setup-buildx-action@v3 and docker/login-action@v3 with the latest recommended major (e.g., `@v4`) throughout the workflow file so both occurrences are consistent; ensure you run a quick workflow lint or dry-run to verify no breaking input changes are required by the newer action majors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/publish-tb-cli.yml:
- Around line 13-18: The publish job (named "publish") can run concurrently and
overwrite the `latest` tag; add a job-level concurrency block to the "publish"
job to serialize runs and cancel in-progress duplicates (e.g., concurrency with
a unique group like "tb-cli-${{ github.ref }}" and cancel-in-progress: true).
Apply the same concurrency block to the other job referenced (lines 38-40) so
both jobs use the same pattern and avoid stale `latest` overwrites.
- Around line 3-4: The workflow currently allows manual workflow_dispatch from
any branch and can publish the :latest image; update the publish job (the job
that builds/pushes images and sets tags) to guard against non-main refs by
adding a job-level condition like `if: github.ref == 'refs/heads/main'` (or
equivalent) so the entire publish job only runs on main, and also ensure any
steps that set or push the `ghcr.io/tryghost/tb-cli:latest` tag (the tag/Push
steps referenced around the tag/latest logic) are similarly gated so they only
run when `github.ref == 'refs/heads/main'`.
- Around line 10-11: The workflow sets explicit permissions but omits repository
contents read access, which breaks actions/checkout@v6; update the
workflow-level permissions block (the permissions: packages: write entry) to
include contents: read so actions/checkout@v6 can access the repo via
GITHUB_TOKEN — add contents: read alongside packages: write in the permissions
mapping.
---
Nitpick comments:
In @.github/workflows/publish-tb-cli.yml:
- Line 23: Update the Docker GitHub Actions to their current stable major
versions: replace usages of docker/setup-buildx-action@v3 and
docker/login-action@v3 with the latest recommended major (e.g., `@v4`) throughout
the workflow file so both occurrences are consistent; ensure you run a quick
workflow lint or dry-run to verify no breaking input changes are required by the
newer action majors.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 74b4fa33-ee15-4c6e-9e0f-5531c20bdf8d
📒 Files selected for processing (1)
.github/workflows/publish-tb-cli.yml
| jobs: | ||
| publish: | ||
| name: Build and push tb-cli to GHCR | ||
| runs-on: ubuntu-latest | ||
| if: github.repository == 'TryGhost/Ghost' | ||
| steps: |
There was a problem hiding this comment.
Add job-level concurrency to avoid stale latest overwrites.
Two close pushes to main can run concurrently; a slower older run can finish last and overwrite latest.
Suggested fix
jobs:
publish:
name: Build and push tb-cli to GHCR
runs-on: ubuntu-latest
if: github.repository == 'TryGhost/Ghost'
+ concurrency:
+ group: publish-tb-cli-${{ github.ref }}
+ cancel-in-progress: true
steps:Also applies to: 38-40
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/publish-tb-cli.yml around lines 13 - 18, The publish job
(named "publish") can run concurrently and overwrite the `latest` tag; add a
job-level concurrency block to the "publish" job to serialize runs and cancel
in-progress duplicates (e.g., concurrency with a unique group like "tb-cli-${{
github.ref }}" and cancel-in-progress: true). Apply the same concurrency block
to the other job referenced (lines 38-40) so both jobs use the same pattern and
avoid stale `latest` overwrites.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26815 +/- ##
=======================================
Coverage 73.19% 73.19%
=======================================
Files 1534 1534
Lines 121065 121065
Branches 14643 14643
=======================================
Hits 88612 88612
Misses 31438 31438
Partials 1015 1015
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🤖 Velo CI Failure AnalysisClassification: 🟠 SOFT FAIL
|
no ref
In an attempt to optimize the E2E tests, creating an image we can pull from GHCR should save us build time on each shard.