Private
Public Access
1
0

refactor: update CI for native per-OS runners
Some checks failed
CI/CD Pipeline / Code Format (push) Failing after 6s
CI/CD Pipeline / Clippy Lints (push) Failing after 11s
CI/CD Pipeline / Unit Tests (push) Failing after 1s
CI/CD Pipeline / Build Debian Package (push) Has been skipped
CI/CD Pipeline / Build RPM Package (push) Has been skipped
CI/CD Pipeline / Build Alpine Package (push) Has been skipped
CI/CD Pipeline / Build Arch Package (push) Has been skipped
CI/CD Pipeline / Security Audit (push) Failing after 1s

- Replace generic "linux" runner label with dedicated per-OS labels
  (ubuntu-24.04, fedora, alpine, arch)
- Remove all container declarations (native runner execution)
- Add build gate dependencies: build jobs need fmt+clippy+test
- Extract release upload logic into reusable scripts/upload-release.sh
- Fix build-alpine.sh: remove hardcoded container paths, add
  SKIP_CARGO_BUILD support
- Fix build-arch.sh: remove hardcoded container paths, add
  SKIP_CARGO_BUILD support
- Fix build-rpm.sh: remove sudo, native runner compatible
- Remove Dockerfile.rpm and Dockerfile.arch (no longer needed)
- Add sudo to Ubuntu/Fedora/Arch package installs for safety
- Add nodejs to Alpine deps for Gitea Actions compatibility
- Make upload-release.sh POSIX sh compatible (Alpine)
- Fix curl -sf to curl -s in upload-release.sh (404 on new releases)
This commit is contained in:
2026-04-26 19:21:09 +00:00
parent 44c182764e
commit a4026a471a
7 changed files with 161 additions and 158 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash
# Build RPM Package for RHEL/CentOS/Fedora
# Run on: RHEL 8/9, CentOS 8/9, Fedora 38+
# Designed for native Gitea Actions runner execution
set -e
@ -11,9 +12,9 @@ echo ""
if ! command -v rpmbuild &> /dev/null; then
echo "Installing RPM build tools..."
if command -v dnf &> /dev/null; then
sudo dnf install -y rpm-build cargo rust gcc systemd-devel
dnf install -y rpm-build cargo rust gcc systemd-devel
elif command -v yum &> /dev/null; then
sudo yum install -y rpm-build cargo rust gcc systemd-devel
yum install -y rpm-build cargo rust gcc systemd-devel
else
echo "Error: Cannot install rpm-build. Please install manually."
exit 1
@ -57,6 +58,6 @@ echo "=== Build Complete ==="
echo "Package: releases/linux-patch-api-*.rpm"
echo ""
echo "Install with:"
echo " sudo dnf install -y ./releases/linux-patch-api-*.rpm"
echo " dnf install -y ./releases/linux-patch-api-*.rpm"
echo " # or"
echo " sudo yum install -y ./releases/linux-patch-api-*.rpm"
echo " yum install -y ./releases/linux-patch-api-*.rpm"