dfghdfghfdgh
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-rootfs-archives (push) Failing after 1m40s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (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 1m40s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (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:
@@ -30,77 +30,37 @@ jobs:
|
|||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Debug current directory
|
- name: Create output directory
|
||||||
run: |
|
run: mkdir -p ./output
|
||||||
echo "Working dir: $(pwd)"
|
|
||||||
ls -lah .
|
|
||||||
|
|
||||||
- name: Create Docker volume
|
- name: Build all Debian rootfs versions into volumes and extract
|
||||||
run: docker volume create build_output
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
- name: Write file using Docker volume
|
|
||||||
run: |
|
|
||||||
docker run --rm \
|
|
||||||
-v build_output:/output \
|
|
||||||
debian \
|
|
||||||
bash -c "echo hello-world > /output/hello.txt"
|
|
||||||
|
|
||||||
- name: Copy file from volume to workspace
|
|
||||||
run: |
|
|
||||||
container_id=$(docker create -v build_output:/output debian)
|
|
||||||
docker cp "$container_id:/output/hello.txt" ./output.txt
|
|
||||||
docker rm "$container_id"
|
|
||||||
|
|
||||||
- name: Read output.txt
|
|
||||||
run: |
|
|
||||||
ls -lh
|
|
||||||
cat output.txt
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
- name: Debug mount inside container
|
|
||||||
run: |
|
|
||||||
docker run --rm --privileged \
|
|
||||||
-v "$(pwd)/output:/output" \
|
|
||||||
fithwum/debian-buster-base \
|
|
||||||
bash -c "ls -lah /output; touch /output/test_debug && ls -lah /output"
|
|
||||||
|
|
||||||
- name: Clean workspace tarballs before build
|
|
||||||
run: |
|
|
||||||
echo "[INFO] Cleaning old tarballs..."
|
|
||||||
rm -frv ."${{ env.OUTPUT_DIR }}/*/debian-*.tar.bz2"
|
|
||||||
rm -frv ."${{ env.OUTPUT_DIR }}/*/rootfs-*.tar.bz2"
|
|
||||||
rm -frv ."${{ env.OUTPUT_DIR }}/sha256sums.txt"
|
|
||||||
|
|
||||||
- name: Build all Debian rootfs versions sequentially
|
|
||||||
run: |
|
run: |
|
||||||
versions=($VERSIONS)
|
versions=($VERSIONS)
|
||||||
mkdir -p "${{ env.OUTPUT_DIR }}"
|
|
||||||
|
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
echo "[INFO] Building $version..."
|
echo "[INFO] Building $version..."
|
||||||
|
volume_name="build_output_$version"
|
||||||
|
docker volume create "$volume_name"
|
||||||
|
|
||||||
docker build --build-arg VERSION=$version -t fithwum/debian-$version-base .
|
docker build --build-arg VERSION=$version -t fithwum/debian-$version-base .
|
||||||
|
|
||||||
docker run --rm --privileged \
|
docker run --rm --privileged \
|
||||||
-v "$(pwd)/output:/output" \
|
-v "$volume_name:/output" \
|
||||||
-e VERSION="$version" \
|
-e VERSION="$version" \
|
||||||
fithwum/debian-$version-base \
|
fithwum/debian-$version-base \
|
||||||
bash -c "ls -lh /output; ls -lh /; ls -lh /builder; /scripts/bootstrap-rootfs.sh \"$version\""
|
bash -c "/scripts/bootstrap-rootfs.sh \"$version\""
|
||||||
done
|
|
||||||
|
|
||||||
- name: Debug check host output files
|
# Extract the output file from the volume
|
||||||
run: |
|
container_id=$(docker create -v "$volume_name:/output" debian)
|
||||||
echo "[DEBUG] Listing: ${{ env.OUTPUT_DIR }}"
|
mkdir -p ./output/$version
|
||||||
ls -lah "${{ env.OUTPUT_DIR }}"
|
docker cp "$container_id:/output/debian-$version.tar.bz2" ./output/$version/
|
||||||
find "${{ env.OUTPUT_DIR }}" -type f
|
docker rm "$container_id"
|
||||||
|
done
|
||||||
|
|
||||||
- name: Validate that archives exist for each version
|
- name: Validate that archives exist for each version
|
||||||
run: |
|
run: |
|
||||||
IFS=' ' read -r -a versions <<< "$VERSIONS"
|
IFS=' ' read -r -a versions <<< "$VERSIONS"
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
path="${{ env.OUTPUT_DIR }}/$version/debian-$version.tar.bz2"
|
path="./output/$version/debian-$version.tar.bz2"
|
||||||
if [[ ! -f "$path" ]]; then
|
if [[ ! -f "$path" ]]; then
|
||||||
echo "[ERROR] Missing archive: $path"
|
echo "[ERROR] Missing archive: $path"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -119,13 +79,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Copy new archives to upload-repo
|
- name: Copy new archives to upload-repo
|
||||||
run: |
|
run: |
|
||||||
found=$(find "${{ env.OUTPUT_DIR }}" -type f -name 'debian-*.tar.bz2')
|
for filepath in ./output/*/debian-*.tar.bz2; do
|
||||||
if [ -z "$found" ]; then
|
|
||||||
echo "[WARNING] No .tar.bz2 archive found in output/!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for filepath in $found; do
|
|
||||||
version_dir=$(basename "$(dirname "$filepath")")
|
version_dir=$(basename "$(dirname "$filepath")")
|
||||||
mkdir -p "upload-repo/$version_dir"
|
mkdir -p "upload-repo/$version_dir"
|
||||||
cp "$filepath" "upload-repo/$version_dir/"
|
cp "$filepath" "upload-repo/$version_dir/"
|
||||||
@@ -140,7 +94,6 @@ jobs:
|
|||||||
checksum=$(sha256sum "$tarball" | awk '{print $1}')
|
checksum=$(sha256sum "$tarball" | awk '{print $1}')
|
||||||
echo "$checksum $tarball" >> sha256sums.txt
|
echo "$checksum $tarball" >> sha256sums.txt
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "[INFO] SHA256 contents:"
|
echo "[INFO] SHA256 contents:"
|
||||||
cat sha256sums.txt
|
cat sha256sums.txt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user