test fix
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-rootfs-archives (push) Failing after 8m55s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bookworm) (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bullseye) (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (trixie) (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Has been skipped
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-rootfs-archives (push) Failing after 8m55s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bookworm) (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bullseye) (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (trixie) (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been skipped
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Has been skipped
This commit is contained in:
@@ -119,6 +119,81 @@ jobs:
|
||||
echo "archives_changed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# build-rootfs:
|
||||
# name: Build rootfs (${{ matrix.version }})
|
||||
# runs-on: vm-docker-build2
|
||||
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# version: [bullseye, bookworm, trixie]
|
||||
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
|
||||
# - name: Create output directory
|
||||
# run: mkdir -p ${{ env.OUTPUT_DIR }}/${{ matrix.version }}
|
||||
|
||||
# - name: Build rootfs Docker image
|
||||
# run: |
|
||||
# VERSION=${{ matrix.version }}
|
||||
# docker build \
|
||||
# --build-arg VERSION="$VERSION" \
|
||||
# -t rootfs-$VERSION .
|
||||
|
||||
# - name: Run rootfs bootstrap
|
||||
# run: |
|
||||
# VERSION=${{ matrix.version }}
|
||||
# OUTPUT_DIR=${{ env.OUTPUT_DIR }}/$VERSION
|
||||
|
||||
# docker run --rm \
|
||||
# -v "$PWD/$OUTPUT_DIR:/output" \
|
||||
# rootfs-$VERSION \
|
||||
# bash -c "/scripts/bootstrap-rootfs.sh $VERSION /output"
|
||||
|
||||
# # Verify tarball exists
|
||||
# TAR="$OUTPUT_DIR/debian-$VERSION.tar.bz2"
|
||||
# if [[ ! -f "$TAR" ]]; then
|
||||
# echo "[ERROR] Rootfs tarball missing: $TAR"
|
||||
# exit 1
|
||||
# else
|
||||
# echo "[OK] Created $TAR"
|
||||
# fi
|
||||
|
||||
# - name: Clone upload repo
|
||||
# run: |
|
||||
# git clone --depth=1 \
|
||||
# https://${GIT_USERNAME}:${GIT_TOKEN}@gitea.fithwum.tech/fithwum/debian-base.git upload
|
||||
|
||||
# - name: Update archive + sha256
|
||||
# run: |
|
||||
# VERSION=${{ matrix.version }}
|
||||
# OUTPUT_DIR=${{ env.OUTPUT_DIR }}/$VERSION
|
||||
|
||||
# mkdir -p upload/$VERSION
|
||||
# cp "$OUTPUT_DIR/debian-$VERSION.tar.bz2" upload/$VERSION/
|
||||
|
||||
# cd upload
|
||||
# # Remove old checksum for this version
|
||||
# sed -i "/debian-$VERSION.tar.bz2/d" sha256sums.txt 2>/dev/null || true
|
||||
# # Add new checksum
|
||||
# sha256sum "$VERSION/debian-$VERSION.tar.bz2" >> sha256sums.txt
|
||||
|
||||
# - name: Commit if changed
|
||||
# run: |
|
||||
# VERSION=${{ matrix.version }}
|
||||
|
||||
# cd upload
|
||||
# git config user.name "$GIT_USERNAME"
|
||||
# git config user.email "$GIT_EMAIL"
|
||||
|
||||
# if git status --porcelain | grep .; then
|
||||
# git add "$VERSION/debian-$VERSION.tar.bz2" sha256sums.txt
|
||||
# git commit -m "Update rootfs for $VERSION [skip ci]"
|
||||
# git push
|
||||
# else
|
||||
# echo "[INFO] No changes for $VERSION"
|
||||
|
||||
# build-and-push-docker-images:
|
||||
# needs: build-and-push-rootfs-archives
|
||||
# if: always()
|
||||
@@ -216,7 +291,7 @@ jobs:
|
||||
|
||||
build-and-push-docker-images:
|
||||
name: Build & Push Docker Images (${{ matrix.version }})
|
||||
needs: build-rootfs
|
||||
needs: build-and-push-rootfs-archives
|
||||
runs-on: vm-docker-build2
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -230,9 +305,10 @@ jobs:
|
||||
- name: Prepare Docker context
|
||||
run: |
|
||||
VERSION=${{ matrix.version }}
|
||||
OUTPUT_DIR=${{ env.OUTPUT_DIR }}/$VERSION
|
||||
mkdir -p "$VERSION"
|
||||
cp "$OUTPUT_DIR/debian-$VERSION.tar.bz2" "$VERSION/"
|
||||
CONTEXT_DIR="$VERSION"
|
||||
mkdir -p "$CONTEXT_DIR"
|
||||
echo "[INFO] Copying rootfs tarball into Docker context..."
|
||||
cp "./output/debian-$VERSION.tar.bz2" "$CONTEXT_DIR/"
|
||||
|
||||
- name: Generate Dockerfile
|
||||
run: |
|
||||
@@ -244,7 +320,7 @@ jobs:
|
||||
"LABEL maintainer=\"fithwum\"" \
|
||||
"ADD debian-$VERSION.tar.bz2 /" \
|
||||
"CMD [\"/bin/bash\"]" > "$DOCKERFILE"
|
||||
echo "[INFO] Created $DOCKERFILE"
|
||||
echo "[INFO] Created Dockerfile for $VERSION"
|
||||
else
|
||||
echo "[INFO] Dockerfile exists for $VERSION"
|
||||
fi
|
||||
@@ -266,7 +342,7 @@ jobs:
|
||||
# Skip build if image already exists with same digest
|
||||
if docker pull "$FULL_IMAGE" >/dev/null 2>&1; then
|
||||
EXISTING_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' "$FULL_IMAGE")
|
||||
NEW_DIGEST=$(sha256sum "${VERSION}/debian-$VERSION.tar.bz2" | awk '{print $1}')
|
||||
NEW_DIGEST=$(sha256sum "./$VERSION/debian-$VERSION.tar.bz2" | awk '{print $1}')
|
||||
if [[ "$EXISTING_DIGEST" == *"$NEW_DIGEST"* ]]; then
|
||||
echo "[INFO] Docker image for $VERSION is up-to-date, skipping build."
|
||||
exit 0
|
||||
|
||||
@@ -3,6 +3,7 @@ FROM debian:latest
|
||||
|
||||
ARG VERSION
|
||||
ENV VERSION=${VERSION}
|
||||
ENV OUTPUT_DIR=/output
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
|
||||
@@ -4,14 +4,14 @@ set -euo pipefail
|
||||
DEBIAN_RELEASE="${VERSION:-}"
|
||||
ROOTFS_DIR="debian-${DEBIAN_RELEASE}"
|
||||
OUTPUT_DIR="/output"
|
||||
TARBALL="${OUTPUT_DIR}/$DEBIAN_RELEASE/debian-${DEBIAN_RELEASE}.tar.bz2"
|
||||
TARBALL="${OUTPUT_DIR}/debian-${DEBIAN_RELEASE}.tar.bz2"
|
||||
|
||||
echo "[INFO] Bootstrapping Debian $DEBIAN_RELEASE rootfs..."
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends debootstrap bzip2
|
||||
|
||||
debootstrap --verbose --variant=minbase --components=main,contrib,non-free \
|
||||
--include=apt,ca-certificates --arch=amd64 "$DEBIAN_RELEASE" "$ROOTFS_DIR" \
|
||||
--include=apt,ca-certificates,software-properties-common,bash,wget,curl,nano,locales --arch=amd64 "$DEBIAN_RELEASE" "$ROOTFS_DIR" \
|
||||
http://deb.debian.org/debian/
|
||||
|
||||
for dir in dev dev/pts proc sys; do
|
||||
@@ -41,7 +41,7 @@ echo "[INFO] Rootfs size:"
|
||||
du -sh "$ROOTFS_DIR"
|
||||
|
||||
echo "[INFO] Creating compressed base image..."
|
||||
mkdir -p "$OUTPUT_DIR/$DEBIAN_RELEASE"
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
tar -cjf "$TARBALL" -C "$ROOTFS_DIR" .
|
||||
|
||||
ls -lh "$TARBALL"
|
||||
|
||||
Reference in New Issue
Block a user