feat: add Homebrew, container image, and install script distribution#7
feat: add Homebrew, container image, and install script distribution#7
Conversation
Add multiple distribution channels for skillctl: - Homebrew: GoReleaser auto-updates pavelanni/homebrew-tap on release - Container: multi-arch image (amd64/arm64) pushed to ghcr.io/redhat-et/skillctl - Install script: curl-based installer that detects OS/arch - go install: documented in README (works today, zero effort) - GitHub Releases: already configured, now documented in README Release workflow updated with GHCR login (packages:write) and HOMEBREW_TAP_TOKEN secret passthrough. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Pavel Anni <panni@redhat.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 34 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis change adds comprehensive release distribution infrastructure for the skillctl project, including automated Docker image building and publishing to GitHub Container Registry, Homebrew formula publication, a curl-installable shell script, and updated documentation with multiple installation methods. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Dockerfile`:
- Around line 4-7: The image currently runs ENTRYPOINT ["skillctl"] as root; add
a non-root user and switch to it using USER to remediate DS-0002. Update the
Dockerfile to create a user (e.g., addgroup/adduser or useradd with a fixed
non-root UID like 1000), ensure /usr/local/bin/skillctl is owned and executable
by that user (chown/chmod), and place the USER <username-or-uid> line before
ENTRYPOINT so skillctl runs unprivileged.
In `@install.sh`:
- Around line 53-60: The chmod +x is executed without sudo even when mv used
sudo, causing permission failures; move the chmod step into the same if/else
that performs mv so it runs under the same privilege level. In the block that
checks [ -w "$INSTALL_DIR" ] and calls mv "${TMPDIR}/${BINARY}"
"${INSTALL_DIR}/${BINARY}", add chmod +x "${INSTALL_DIR}/${BINARY}" there, and
in the else branch that uses sudo mv use sudo chmod +x
"${INSTALL_DIR}/${BINARY}" so ownership and permissions are set with matching
privileges for INSTALL_DIR, BINARY, and TMPDIR.
- Around line 47-51: Add checksum verification before extracting the downloaded
archive: after downloading "${TMPDIR}/${ARCHIVE}" and before tar -xzf, fetch the
release's checksums file (e.g., checksums.txt) from the same URL base, compute
the archive's SHA-256 digest (using shasum -a 256 or sha256sum) and compare it
against the expected entry for "${ARCHIVE}" in the checksums file; if the
checksum lookup or comparison fails, log an error and exit nonzero instead of
extracting. Use the existing variables (BINARY, VERSION, OS, ARCH, TMPDIR,
ARCHIVE, URL) to locate both the archive and checksums file and make the script
robust to missing tools or mismatches by handling errors and failing fast.
In `@README.md`:
- Around line 39-42: The installer env vars are currently applied only to curl;
change the README command so VERSION and INSTALL_DIR are passed to the shell
that executes the piped script (e.g., invoke sh with the env vars or use env to
set VERSION and INSTALL_DIR before sh and include the -s/-- to ensure the script
reads from stdin); update the example command in README.md so the installer
receives VERSION and INSTALL_DIR instead of only curl.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 00fa4bf0-ac59-478a-8413-4878cda901cd
📒 Files selected for processing (5)
.github/workflows/release.yaml.goreleaser.yamlDockerfileREADME.mdinstall.sh
- Dockerfile: run as non-root (UID 65534) instead of root - install.sh: verify SHA-256 checksum before extracting archive - install.sh: match chmod privilege level with mv (sudo when needed) - README: pass VERSION/INSTALL_DIR to sh, not curl Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Pavel Anni <panni@redhat.com>
Summary
pavelanni/homebrew-tapon each releaseghcr.io/redhat-et/skillctl) built from a minimal scratch-based Dockerfileinstall.sh— a curl-based installer that detects OS/arch and downloads from GitHub ReleasesSetup required before first release
pavelanni/homebrew-taprepo on GitHub (empty, public)reposcope for that repoHOMEBREW_TAP_TOKENsecret inredhat-et/skillimagesettingsTest plan
goreleaser checkvalidates configmake testandmake lintpassgoreleaser release --snapshot --cleanto verify archives, Docker images, and formula generationbrew install pavelanni/tap/skillctlworks after first release🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation