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
This commit is contained in:
parent
62e4aa989d
commit
f9bd185ecf
4 changed files with 271 additions and 270 deletions
|
|
@ -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! 🎉"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue