From f9bd185ecfb1c414a7c6f8375b6311f003dd7467 Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 13 Aug 2025 18:09:06 -0700 Subject: [PATCH] Fix YAML indentation issues in CI workflow - Fix step indentation from 4 spaces to 6 spaces - Maintain proper YAML structure for all job sections - Ensure consistent formatting across build-and-test, security, package, and status jobs - Resolve yamllint indentation errors --- .forgejo/workflows/build.yml | 84 +++---- .forgejo/workflows/ci.yml | 337 ++++++++++++++------------- .forgejo/workflows/test.yml | 48 ++-- .forgejo/workflows/update-readme.yml | 72 +++--- 4 files changed, 271 insertions(+), 270 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 7eac3196..e4be1a43 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -1,7 +1,7 @@ name: Build apt-ostree Package # ⚠️ IMPORTANT: Each repository needs its own FORGEJO_TOKEN secret! -# +# # To set up this workflow in a new repository: # 1. Go to repository settings: https://git.raines.xyz/OWNER/REPO/settings # 2. Find "Secrets" or "Repository secrets" section @@ -38,48 +38,48 @@ jobs: run: | # Update package lists apt update -y - + # Install essential build tools apt install -y git curl pkg-config build-essential gnupg wget - + # Install Rust using rustup to get the latest version curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . ~/.cargo/env - + # Set default toolchain for rustup rustup default stable - + # Verify Rust version rustc --version cargo --version - + # Check if apt-cacher-ng is available and configure sources accordingly echo "Checking for apt-cacher-ng availability..." if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then echo "✅ apt-cacher-ng is available, configuring proxy sources..." - + # Configure apt-cacher-ng proxy sources cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free deb http://192.168.1.101:3142/HTTPS///get.docker.com/ubuntu docker main EOF - + # Update package lists with proxy sources apt update -y else echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - + # Use standard Debian sources cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' deb http://deb.debian.org/debian stable main contrib non-free deb-src http://deb.debian.org/debian stable main contrib non-free EOF - + # Update package lists apt update -y fi - + # Install essential build dependencies echo "Installing essential build dependencies..." apt install -y \ @@ -119,7 +119,7 @@ jobs: python3-setuptools \ python3-wheel \ python3-pip - + echo "✅ All build dependencies installed successfully" - name: Checkout repository manually @@ -150,30 +150,30 @@ jobs: - name: Test API endpoints run: | echo "=== Testing Forgejo API endpoints with ACCESS_TOKEN ===" - + # Test 1: Check Forgejo version and capabilities echo "Testing Forgejo version..." curl -s -H "Authorization: token $ACCESS_TOKEN" \ "https://git.raines.xyz/api/v1/version" | jq '.' || echo "Version endpoint failed" - + # Test 2: Check repository info echo "=== Testing repository info ===" echo "Testing repository info..." curl -s -H "Authorization: token $ACCESS_TOKEN" \ "https://git.raines.xyz/api/v1/repos/robojerk/apt-ostree" | jq '.' || echo "Repository endpoint failed" - + # Test 3: Check package registry endpoints echo "=== Testing package registry endpoints ===" echo "Testing package registry availability..." curl -s -H "Authorization: token $ACCESS_TOKEN" \ "https://git.raines.xyz/api/v1/user/packages" | jq '.' || echo "User packages endpoint failed" - + # Test 4: Check repository packages echo "=== Testing repository packages ===" echo "Testing repository packages..." curl -s -H "Authorization: token $ACCESS_TOKEN" \ "https://git.raines.xyz/api/v1/repos/robojerk/apt-ostree/packages" | jq '.' || echo "Repository packages endpoint failed" - + # Test 5: Check Debian package registry echo "=== Testing Debian package registry ===" echo "Testing Debian package registry..." @@ -184,7 +184,7 @@ jobs: run: | # Update package lists apt update -y - + # Install additional dependencies that might be needed apt install -y \ libapt-pkg-dev \ @@ -256,25 +256,25 @@ jobs: # Source Rust environment and ensure default toolchain is set . ~/.cargo/env rustup default stable - + # Set environment variables for the entire build process export PATH="$HOME/.cargo/bin:$PATH" export CARGO_HOME="$HOME/.cargo" export RUSTUP_HOME="$HOME/.rustup" - + echo "Building apt-ostree package..." - + # Check if build script exists and make it executable if [ -f "./build-debian-trixie.sh" ]; then echo "✅ Build script found, making it executable..." chmod +x ./build-debian-trixie.sh - + # Build the package ./build-debian-trixie.sh echo "✅ Package build successful" else echo "⚠️ Build script not found, attempting manual build..." - + # Try manual build process echo "Installing build dependencies..." apt-get update @@ -314,10 +314,10 @@ jobs: python3-setuptools \ python3-wheel \ python3-pip - + echo "Building package manually..." dpkg-buildpackage -us -uc -b - + if [ $? -eq 0 ]; then echo "✅ Manual package build successful" else @@ -334,15 +334,15 @@ jobs: - name: Test package installation run: | echo "Testing package installation..." - + # Find the main package MAIN_PKG=$(ls ../apt-ostree_*.deb | head -1) if [ -n "$MAIN_PKG" ]; then echo "Installing package: $MAIN_PKG" - + # Install the package dpkg -i "$MAIN_PKG" - + # Check if apt-ostree is available if command -v apt-ostree >/dev/null 2>&1; then echo "✅ apt-ostree installed successfully" @@ -360,23 +360,23 @@ jobs: if: success() run: | echo "Publishing packages to Forgejo Package Registry..." - + # Find all .deb packages DEB_PACKAGES=$(ls ../*.deb 2>/dev/null || echo "") - + if [ -n "$DEB_PACKAGES" ]; then for pkg in $DEB_PACKAGES; do echo "Publishing package: $pkg" - + # Extract package name and version PKG_NAME=$(dpkg-deb -f "$pkg" Package) PKG_VERSION=$(dpkg-deb -f "$pkg" Version) PKG_ARCH=$(dpkg-deb -f "$pkg" Architecture) - + echo "Package: $PKG_NAME" echo "Version: $PKG_VERSION" echo "Architecture: $PKG_ARCH" - + # Create package metadata cat > package.json << 'EOF' { @@ -392,7 +392,7 @@ jobs: "maintainer": "Robojerk " } EOF - + # Upload package to Forgejo Package Registry # Note: This is a placeholder - actual implementation depends on Forgejo API echo "Package metadata created for $PKG_NAME" @@ -405,26 +405,26 @@ jobs: - name: Create build summary run: | echo "Creating build summary..." - + # Create a summary markdown file cat > BUILD_SUMMARY.md << 'EOF' # APT-OSTree Build Summary - + ## Build Information - **Build Date**: $(date '+%Y-%m-%d %H:%M:%S UTC') - **Build ID**: $(date +%s) - **Commit**: $(git rev-parse --short HEAD 2>/dev/null || echo "Unknown") - **Branch**: $(git branch --show-current 2>/dev/null || echo "Unknown") - + ## Build Status - **Status**: ✅ SUCCESS - **Container**: debian:latest - **Rust Version**: $(rustc --version) - **Cargo Version**: $(cargo --version) - + ## Built Packages EOF - + # Add package information if ls ../*.deb >/dev/null 2>&1; then echo "" >> BUILD_SUMMARY.md @@ -437,7 +437,7 @@ jobs: echo "- **$PKG_NAME** ($PKG_VERSION) [$PKG_ARCH] - $PKG_SIZE" >> BUILD_SUMMARY.md done fi - + # Add dependency information echo "" >> BUILD_SUMMARY.md echo "### Dependencies" >> BUILD_SUMMARY.md @@ -446,6 +446,6 @@ jobs: echo "- libdbus-1-dev ✅" >> BUILD_SUMMARY.md echo "- libglib2.0-dev ✅" >> BUILD_SUMMARY.md echo "- All build dependencies satisfied ✅" >> BUILD_SUMMARY.md - + echo "Build summary created: BUILD_SUMMARY.md" - echo "Build completed successfully! 🎉" \ No newline at end of file + echo "Build completed successfully! 🎉" diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 69f7c4e7..5050cf2b 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -20,71 +20,71 @@ jobs: image: debian:latest steps: - - name: Checkout code - run: | - # Clone the repository manually - git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree - cp -r /tmp/apt-ostree/* . - cp -r /tmp/apt-ostree/.* . 2>/dev/null || true + - name: Checkout code + run: | + # Clone the repository manually + git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree + cp -r /tmp/apt-ostree/* . + cp -r /tmp/apt-ostree/.* . 2>/dev/null || true - - name: Setup environment - run: | - # Update package lists - apt update -y - - # Check if apt-cacher-ng is available - echo "Checking for apt-cacher-ng availability..." - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - echo "✅ apt-cacher-ng is available, configuring proxy sources..." - cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' - deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free - deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free - deb http://192.168.1.101:3142/HTTPS///get.docker.com/ubuntu docker main - EOF + - name: Setup environment + run: | + # Update package lists apt update -y - else - echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' - deb http://deb.debian.org/debian stable main contrib non-free - deb-src http://deb.debian.org/debian stable main contrib non-free - EOF - apt update -y - fi - - name: Install dependencies - run: | - apt-get update - apt-get install -y \ - build-essential \ - pkg-config \ - libssl-dev \ - libdbus-1-dev \ - libglib2.0-dev \ - libapt-pkg-dev \ - curl \ - git \ - wget + # Check if apt-cacher-ng is available + echo "Checking for apt-cacher-ng availability..." + if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then + echo "✅ apt-cacher-ng is available, configuring proxy sources..." + cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' + deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free + deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free + deb http://192.168.1.101:3142/HTTPS///get.docker.com/ubuntu docker main + EOF + apt update -y + else + echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." + cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' + deb http://deb.debian.org/debian stable main contrib non-free + deb-src http://deb.debian.org/debian stable main contrib non-free + EOF + apt update -y + fi - - name: Install Rust - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - . ~/.cargo/env - rustup default stable + - name: Install dependencies + run: | + apt-get update + apt-get install -y \ + build-essential \ + pkg-config \ + libssl-dev \ + libdbus-1-dev \ + libglib2.0-dev \ + libapt-pkg-dev \ + curl \ + git \ + wget - - name: Build project - run: | - . ~/.cargo/env - cargo build --release + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . ~/.cargo/env + rustup default stable - - name: Run tests - run: | - . ~/.cargo/env - cargo test + - name: Build project + run: | + . ~/.cargo/env + cargo build --release - - name: Create summary - run: | - echo "Build and test completed successfully!" - echo "✅ CI completed! 🎉" + - name: Run tests + run: | + . ~/.cargo/env + cargo test + + - name: Create summary + run: | + echo "Build and test completed successfully!" + echo "✅ CI completed! 🎉" # Security check security: @@ -94,45 +94,45 @@ jobs: image: debian:latest steps: - - name: Checkout code - run: | - git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree - cp -r /tmp/apt-ostree/* . - cp -r /tmp/apt-ostree/.* . 2>/dev/null || true + - name: Checkout code + run: | + git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree + cp -r /tmp/apt-ostree/* . + cp -r /tmp/apt-ostree/.* . 2>/dev/null || true - - name: Setup environment - run: | - apt update -y - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' - deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free - deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free - EOF + - name: Setup environment + run: | apt update -y - else - cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' - deb http://deb.debian.org/debian stable main contrib non-free - deb-src http://deb.debian.org/debian stable main contrib non-free - EOF - apt update -y - fi + if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then + cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' + deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free + deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free + EOF + apt update -y + else + cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' + deb http://deb.debian.org/debian stable main contrib non-free + deb-src http://deb.debian.org/debian stable main contrib non-free + EOF + apt update -y + fi - - name: Install Rust and security tools - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - . ~/.cargo/env - apt-get update - apt-get install -y cargo-audit + - name: Install Rust and security tools + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . ~/.cargo/env + apt-get update + apt-get install -y cargo-audit - - name: Run security audit - run: | - . ~/.cargo/env - cargo audit + - name: Run security audit + run: | + . ~/.cargo/env + cargo audit - - name: Create summary - run: | - echo "Security audit completed successfully!" - echo "✅ Security check completed! 🎉" + - name: Create summary + run: | + echo "Security audit completed successfully!" + echo "✅ Security check completed! 🎉" # Package build package: @@ -142,60 +142,60 @@ jobs: image: debian:latest steps: - - name: Checkout code - run: | - git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree - cp -r /tmp/apt-ostree/* . - cp -r /tmp/apt-ostree/.* . 2>/dev/null || true + - name: Checkout code + run: | + git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree + cp -r /tmp/apt-ostree/* . + cp -r /tmp/apt-ostree/.* . 2>/dev/null || true - - name: Setup environment - run: | - apt update -y - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' - deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free - deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free - EOF + - name: Setup environment + run: | apt update -y - else - cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' - deb http://deb.debian.org/debian stable main contrib non-free - deb-src http://deb.debian.org/debian stable main contrib non-free - EOF - apt update -y - fi + if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then + cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' + deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free + deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free + EOF + apt update -y + else + cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' + deb http://deb.debian.org/debian stable main contrib non-free + deb-src http://deb.debian.org/debian stable main contrib non-free + EOF + apt update -y + fi - - name: Install build dependencies - run: | - apt-get update - apt-get install -y \ - build-essential \ - devscripts \ - debhelper \ - dh-cargo \ - cargo \ - rustc \ - pkg-config \ - libssl-dev \ - libdbus-1-dev \ - libglib2.0-dev \ - libapt-pkg-dev + - name: Install build dependencies + run: | + apt-get update + apt-get install -y \ + build-essential \ + devscripts \ + debhelper \ + dh-cargo \ + cargo \ + rustc \ + pkg-config \ + libssl-dev \ + libdbus-1-dev \ + libglib2.0-dev \ + libapt-pkg-dev - - name: Build package - run: | - if [ -f "./build-debian-trixie.sh" ]; then - chmod +x ./build-debian-trixie.sh - ./build-debian-trixie.sh - else - echo "Build script not found, attempting manual build..." - dpkg-buildpackage -us -uc -b - fi + - name: Build package + run: | + if [ -f "./build-debian-trixie.sh" ]; then + chmod +x ./build-debian-trixie.sh + ./build-debian-trixie.sh + else + echo "Build script not found, attempting manual build..." + dpkg-buildpackage -us -uc -b + fi - - name: Create summary - run: | - echo "Package build completed!" - ls -la ../*.deb 2>/dev/null || echo "No packages found" - echo "✅ Package build completed! 🎉" + - name: Create summary + run: | + echo "Package build completed!" + ls -la ../*.deb 2>/dev/null || echo "No packages found" + echo "✅ Package build completed! 🎉" # Final status status: @@ -205,30 +205,31 @@ jobs: if: always() steps: - - name: Check results - run: | - echo "All jobs completed" - echo "Build and Test: Completed" - echo "Security: Completed" - echo "Package: Completed" - - cat > CI_SUMMARY.md << 'EOF' - # APT-OSTree CI Summary - - ## Build Information - - **Build Date**: $(date '+%Y-%m-%d %H:%M:%S UTC') - - **Build ID**: $(date +%s) - - **Commit**: $(git rev-parse --short HEAD 2>/dev/null || echo "Unknown") - - **Branch**: $(git branch --show-current 2>/dev/null || echo "Unknown") - - ## Job Results - - **Build and Test**: Completed - - **Security**: Completed - - **Package**: Completed - - ## Summary - CI completed. Check individual job results above. - EOF - - echo "CI summary created: CI_SUMMARY.md" - echo "✅ All CI jobs completed! 🎉" + - name: Check results + run: | + echo "All jobs completed" + echo "Build and Test: Completed" + echo "Security: Completed" + echo "Package: Completed" + + cat > CI_SUMMARY.md <<- 'EOF' + # APT-OSTree CI Summary + + ## Build Information + - **Build Date**: $(date '+%Y-%m-%d %H:%M:%S UTC') + - **Build ID**: $(date +%s) + - **Commit**: $(git rev-parse --short HEAD 2>/dev/null || echo "Unknown") + - **Branch**: $(git branch --show-current 2>/dev/null || echo "Unknown") + + ## Job Results + - **Build and Test**: Completed + - **Security**: Completed + - **Package**: Completed + + ## Summary + CI completed. Check individual job results above. + EOF + + echo "CI summary created: CI_SUMMARY.md" + echo "✅ All CI jobs completed! 🎉" + diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index bc5ffb13..7b7eef37 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -22,44 +22,44 @@ jobs: run: | # Update package lists apt update -y - + # Install essential build tools apt install -y git curl pkg-config build-essential wget - + # Install Rust using rustup to get the latest version curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . ~/.cargo/env - + # Set default toolchain for rustup rustup default stable - + # Verify Rust version rustc --version cargo --version - + # Check if apt-cacher-ng is available and configure sources accordingly echo "Checking for apt-cacher-ng availability..." if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then echo "✅ apt-cacher-ng is available, configuring proxy sources..." - + # Configure apt-cacher-ng proxy sources cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free deb http://192.168.1.101:3142/HTTPS///get.docker.com/ubuntu docker main EOF - + # Update package lists with proxy sources apt update -y else echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - + # Use standard Debian sources cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' deb http://deb.debian.org/debian stable main contrib non-free deb-src http://deb.debian.org/debian stable main contrib non-free EOF - + # Update package lists apt update -y fi @@ -75,7 +75,7 @@ jobs: run: | # Update package lists apt update -y - + # Install essential build dependencies apt install -y \ libapt-pkg-dev \ @@ -152,19 +152,19 @@ jobs: # Source Rust environment and ensure default toolchain is set . ~/.cargo/env rustup default stable - + # Set environment variables for the entire build process export PATH="$HOME/.cargo/bin:$PATH" export CARGO_HOME="$HOME/.cargo" export RUSTUP_HOME="$HOME/.rustup" - + echo "Testing package build..." - + # Check if we're in the right directory and have the right files echo "Current directory: $(pwd)" echo "Files in current directory:" ls -la - + # Check if debian directory exists if [ -d "debian" ]; then echo "✅ debian directory found" @@ -180,11 +180,11 @@ jobs: echo "" >> debian/control echo "This is a test control file for CI testing." >> debian/control fi - + # Try to build the package if dpkg-buildpackage -us -uc -b; then echo "✅ Package build successful" - + # List built packages echo "Built packages:" ls -la ../*.deb ../*.ddeb ../*.changes ../*.buildinfo 2>/dev/null || echo "No packages found" @@ -197,40 +197,40 @@ jobs: - name: Create test summary run: | echo "Creating test summary..." - + # Create a summary markdown file cat > TEST_SUMMARY.md << 'EOF' # APT-OSTree Test Summary - + ## Test Information - **Test Date**: $(date '+%Y-%m-%d %H:%M:%S UTC') - **Test ID**: $(date +%s) - **Commit**: $(git rev-parse --short HEAD 2>/dev/null || echo "Unknown") - **Branch**: $(git branch --show-current 2>/dev/null || echo "Unknown") - + ## Test Status - **Status**: ✅ SUCCESS - **Container**: debian:latest - **Rust Version**: $(rustc --version) - **Cargo Version**: $(cargo --version) - + ## Test Results - **Cargo Build**: ✅ SUCCESS - **Cargo Tests**: ✅ SUCCESS - **Package Build**: ✅ SUCCESS (if dependencies available) - + ## Dependencies - libapt-pkg-dev ✅ - libssl-dev ✅ - libdbus-1-dev ✅ - libglib2.0-dev ✅ - All test dependencies satisfied ✅ - + ## Notes - This is a test workflow to verify the build process - Full package building is handled by the build workflow - All tests passed successfully EOF - + echo "Test summary created: TEST_SUMMARY.md" - echo "Test completed successfully! 🎉" \ No newline at end of file + echo "Test completed successfully! 🎉" diff --git a/.forgejo/workflows/update-readme.yml b/.forgejo/workflows/update-readme.yml index 262667c2..2a0cdd9d 100644 --- a/.forgejo/workflows/update-readme.yml +++ b/.forgejo/workflows/update-readme.yml @@ -18,33 +18,33 @@ jobs: run: | # Update package lists apt update -y - + # Install essential tools apt install -y git curl wget - + # Check if apt-cacher-ng is available and configure sources accordingly echo "Checking for apt-cacher-ng availability..." if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then echo "✅ apt-cacher-ng is available, configuring proxy sources..." - + # Configure apt-cacher-ng proxy sources cat > /etc/apt/sources.list.d/apt-cacher-ng.list <<- 'EOF' deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free deb http://192.168.1.101:3142/HTTPS///get.docker.com/ubuntu docker main EOF - + # Update package lists with proxy sources apt update -y else echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - + # Use standard Debian sources cat > /etc/apt/sources.list.d/standard.list <<- 'EOF' deb http://deb.debian.org/debian stable main contrib non-free deb-src http://deb.debian.org/debian stable main contrib non-free EOF - + # Update package lists apt update -y fi @@ -61,26 +61,26 @@ jobs: # Get current date and workflow run ID BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S UTC') WORKFLOW_RUN_ID=$(date +%s) - + echo "Updating README with workflow run ID: $WORKFLOW_RUN_ID" - + # Create the download section content cat > download-section.md << EOF - + ## 📦 Download Latest Build - - **Last Built**: $BUILD_DATE - **Version**: 0.1.0-1 + + **Last Built**: $BUILD_DATE + **Version**: 0.1.0-1 **Target**: Debian Stable **Build ID**: $WORKFLOW_RUN_ID - + ### Download Links - + - **apt-ostree_0.1.0-1_amd64.deb** - Build $WORKFLOW_RUN_ID - **apt-ostree-dbgsym_0.1.0-1_amd64.ddeb** - Build $WORKFLOW_RUN_ID - + ### Quick Installation - + \`\`\`bash # Download and install the package # Build ID: $WORKFLOW_RUN_ID @@ -88,43 +88,43 @@ jobs: sudo dpkg -i apt-ostree_0.1.0-1_amd64.deb sudo apt-get install -f # Install any missing dependencies \`\`\` - + ### Verification - + \`\`\`bash # Check if apt-ostree is installed apt-ostree --version # Should output: apt-ostree 0.1.0 \`\`\` - + ### Usage Example - + \`\`\`bash # Check status apt-ostree status - + # List packages apt-ostree list - + # Search packages apt-ostree search - + # Build OCI image apt-ostree compose build-chunked-oci \`\`\` - + --- - + EOF - + # Replace the existing download section in README.md # First, remove the old download section sed -i '/## 📦 Download Latest Build/,/^---$/d' README.md - + # Then insert the new download section after the first section awk '/^## 🚀 Quick Start/{print; print ""; system("cat download-section.md"); next} 1' README.md > README.md.tmp mv README.md.tmp README.md - + echo "README updated with download links for workflow run $WORKFLOW_RUN_ID" - name: Commit and push changes @@ -132,38 +132,38 @@ jobs: # Configure git git config --global user.email "action@github.com" git config --global user.name "GitHub Action" - + # Add and commit changes git add README.md git commit -m "Update README with download links for build $(date +%s)" - + # Push changes git push origin main - name: Create update summary run: | echo "Creating update summary..." - + # Create a summary markdown file cat > UPDATE_SUMMARY.md << 'EOF' # README Update Summary - + ## Update Information - **Update Date**: $(date '+%Y-%m-%d %H:%M:%S UTC') - **Triggered by**: Build workflow $(date +%s) - **Status**: ✅ SUCCESS - + ## Changes Made - Updated download section with latest build links - Updated target platform from Ubuntu Noble to Debian Stable - Updated build ID reference - Maintained all existing functionality - + ## Next Steps - README has been automatically updated - Changes have been committed and pushed to main branch - Users can now access the latest build information EOF - + echo "Update summary created: UPDATE_SUMMARY.md" - echo "README update completed successfully! 🎉" \ No newline at end of file + echo "README update completed successfully! 🎉"