ci: refactor workflows with extended naming support#33
Conversation
Adopt improved workflow structure from cockpit-apt: - Replace build.yml with pr.yml (runs tests on PRs) - Replace release-drafter.yml with main.yml (tests + build + releases) - Update release.yml with APT_DISTRO/APT_COMPONENT env vars - Create composite actions (.github/actions/run-tests, build-deb) - Add helper scripts (read-version.sh, check-release-exists.sh, generate-release-notes.sh) Key changes: - Eliminate parallel builds (reduce CI time ~50%) - Clear separation of concerns (pr.yml, main.yml, release.yml) - Extended naming support: packages renamed with +any+haltabs suffix - Version read from VERSION file - Build uses arm64 runners for package building Closes #32 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Review: CI Workflow RefactoringStatus: Issues1. Wrong product references in release notes 🔴
Fix: Replace all Cockpit APT references with HALPI2-daemon content. 2. Missing VERSION file 🔴 Options:
3. Hardcoded architecture 🟡 Positive✅ Good separation: PR checks vs main branch builds Required Actions
Cannot merge until product references are corrected. |
- Simplify .bumpversion.cfg to match cockpit-apt pattern - Add VERSION file as canonical version source - Fix generate-release-notes.sh to reference HALPI2 daemon instead of Cockpit APT - Add bumpversion command to run script for version management Addresses all issues raised in PR #33 review: 1. Fixed all "Cockpit APT" references in release notes 2. Added VERSION file and updated bumpversion config 3. Architecture remains hardcoded to arm64 (acceptable for HALPI2) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Convert all command names from colon-separated (e.g., package:deb) to hyphen-separated (e.g., package-deb) to match the naming scheme used in cockpit-apt and other HaLOS repositories. Changes: - release:version → release-version - package:deb → package-deb - package:deb:only → package-deb-only - package:deb:docker → package-deb-docker - package:docker:build → package-docker-build - ci:check → ci-check - ci:build → ci-build - dev:env → dev-env - dev:version:bump → dev-version-bump - dev:version:dry-run → dev-version-dry-run - dev:version:show → dev-version-show - docker:build → docker-build - docker:remove → docker-remove Backward compatibility: - Added colon-separated aliases for all renamed commands - Existing scripts and workflows will continue to work 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update from non-existent package:deb:docker:ci to package-deb-docker. The :ci suffix was incorrect - the command should just be package-deb-docker which builds the Debian package using the Docker container. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Further simplify command naming to match cockpit-apt patterns: Command Name Changes: - release-version → version - package-deb → build-deb - package-deb-only → (merged into build-deb) - package-deb-docker → docker-build-deb - package-docker-build → build-docker-tools - dev-version-bump → (removed, use bumpversion directly) - dev-version-dry-run → bumpversion-dry-run - dev-version-show → (removed, use version directly) - docker-build → build-docker - docker-remove → remove-docker - uv-download → install-uv Simplifications: - Merged package-deb-only into build-deb (simpler structure) - Changed bumpversion to simple wrapper that forwards all args - Moved debtools from legacy section to Development Utilities - Removed all backward compatibility aliases (clean slate) - Updated .github/actions/build-deb/action.yml to use docker-build-deb Benefits: - Consistent verb-noun or action-object naming - Simpler command structure - Better alignment with cockpit-apt conventions - bumpversion now supports all bump2version arguments directly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflicts: - .bumpversion.cfg: Kept simplified config, updated version to 4.0.7 - .github/workflows/build.yml: Removed (replaced by pr.yml and main.yml) - .github/workflows/release-drafter.yml: Removed (replaced by main.yml) - .github/workflows/release.yml: Kept our refactored version - run: Kept our simplified command structure The refactored CI/CD structure takes precedence over the incremental fixes added to main. Our version provides a cleaner foundation.
Re-Review: All Issues Fixed ✅Previous Issues - All Resolved✅ Product references corrected - ✅ VERSION file exists - Repository has VERSION file (4.0.7) that ✅ Content updated - Release notes now describe HALPI2 features:
✅ Tests passing - CI checks pass (10s) Additional Improvements Noticed✅ Bumpversion config updated (commit=False, tag=False) Status: APPROVE ✅ - Ready to merge Great work addressing all the feedback! The workflow refactoring is now complete and correct. |
Set commit = True in .bumpversion.cfg to automatically create commits when bumping versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Refactor GitHub Actions workflows to support extended naming and improve CI/CD structure.
This adopts the improved workflow structure from cockpit-apt, providing better separation of concerns and support for extended naming in package releases.
Changes
build-deb/action.yml: Reusable Debian package buildingrun-tests/action.yml: Reusable test executioncheck-release-exists.sh: Validate release stateread-version.sh: Extract version informationgenerate-release-notes.sh: Automated release notesbuild.yml→pr.yml(runs tests on PRs)main.yml(tests + build + releases)release.ymlrelease-drafter.ymlBenefits
Test Plan
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com