test
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-rootfs-archives (push) Failing after 1m53s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / push-archives-to-repo (push) Has been skipped
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-rootfs-archives (push) Failing after 1m53s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / push-archives-to-repo (push) Has been skipped
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:
@@ -29,6 +29,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
versions=(buster bullseye bookworm trixie docker-build)
|
versions=(buster bullseye bookworm trixie docker-build)
|
||||||
|
|
||||||
|
rm -f sha256sums.txt
|
||||||
|
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
echo "[INFO] Building Debian $version rootfs..."
|
echo "[INFO] Building Debian $version rootfs..."
|
||||||
docker build --build-arg VERSION=$version -t fithwum/debian-$version-base .
|
docker build --build-arg VERSION=$version -t fithwum/debian-$version-base .
|
||||||
@@ -38,14 +40,20 @@ jobs:
|
|||||||
fithwum/debian-$version-base \
|
fithwum/debian-$version-base \
|
||||||
bash base-image-script/debian-${version}_pt1.sh
|
bash base-image-script/debian-${version}_pt1.sh
|
||||||
|
|
||||||
# Normalize tarball to expected structure
|
RAW_ARCHIVE="debian-${version}.tar.bz2"
|
||||||
echo "[INFO] Normalizing archive output for $version..."
|
FINAL_ARCHIVE="${version}/rootfs-${version}.tar.bz2"
|
||||||
ROOTFS_ARCHIVE="debian-${version}.tar.bz2"
|
|
||||||
if [ -f "$ROOTFS_ARCHIVE" ]; then
|
if [[ -f "$RAW_ARCHIVE" ]]; then
|
||||||
mkdir -p "${version}"
|
mkdir -p "$(dirname "$FINAL_ARCHIVE")"
|
||||||
mv "$ROOTFS_ARCHIVE" "${version}/rootfs-${version}.tar.bz2"
|
mv "$RAW_ARCHIVE" "$FINAL_ARCHIVE"
|
||||||
|
|
||||||
|
# Generate and log SHA256
|
||||||
|
CHECKSUM=$(sha256sum "$FINAL_ARCHIVE" | awk '{print $1}')
|
||||||
|
echo "[INFO] SHA256 for $FINAL_ARCHIVE: $CHECKSUM"
|
||||||
|
echo "$CHECKSUM $FINAL_ARCHIVE" >> sha256sums.txt
|
||||||
else
|
else
|
||||||
echo "[WARNING] Expected archive $ROOTFS_ARCHIVE not found for $version!"
|
echo "[ERROR] Archive for $version not found: $RAW_ARCHIVE"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -53,6 +61,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "[INFO] Looking for tarballs in workspace..."
|
echo "[INFO] Looking for tarballs in workspace..."
|
||||||
find . -name '*.tar.bz2' -ls
|
find . -name '*.tar.bz2' -ls
|
||||||
|
|
||||||
|
- name: Upload SHA256 checksums
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: sha256sums
|
||||||
|
path: sha256sums.txt
|
||||||
# build-rootfs-archives:
|
# build-rootfs-archives:
|
||||||
# runs-on: docker-build
|
# runs-on: docker-build
|
||||||
|
|
||||||
@@ -214,6 +228,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone "https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_TOKEN }}@gitea.fithwum.tech/fithwum/debian-base.git" upload-repo
|
git clone "https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_TOKEN }}@gitea.fithwum.tech/fithwum/debian-base.git" upload-repo
|
||||||
|
|
||||||
|
- name: Copy checksum file into workspace
|
||||||
|
run: cp ../sha256sums.txt upload-repo/
|
||||||
|
|
||||||
- name: Generate build-info.json per version
|
- name: Generate build-info.json per version
|
||||||
run: |
|
run: |
|
||||||
human_size() {
|
human_size() {
|
||||||
@@ -245,6 +262,12 @@ jobs:
|
|||||||
|
|
||||||
size_human=$(human_size "$size_bytes")
|
size_human=$(human_size "$size_bytes")
|
||||||
|
|
||||||
|
# Load SHA256 from file if available
|
||||||
|
SHA256=$(grep "/$version/rootfs-$version.tar.bz2" ../sha256sums.txt | awk '{print $1}')
|
||||||
|
if [[ -z "$SHA256" ]]; then
|
||||||
|
SHA256="unknown"
|
||||||
|
fi
|
||||||
|
|
||||||
jq -n \
|
jq -n \
|
||||||
--arg version "$version" \
|
--arg version "$version" \
|
||||||
--arg commit "$(git rev-parse HEAD)" \
|
--arg commit "$(git rev-parse HEAD)" \
|
||||||
@@ -253,6 +276,7 @@ jobs:
|
|||||||
--arg digest "$digest" \
|
--arg digest "$digest" \
|
||||||
--arg image_size "$size_human" \
|
--arg image_size "$size_human" \
|
||||||
--argjson image_size_bytes "$size_bytes" \
|
--argjson image_size_bytes "$size_bytes" \
|
||||||
|
--arg sha256 "$SHA256" \
|
||||||
'{
|
'{
|
||||||
version: $version,
|
version: $version,
|
||||||
commit: $commit,
|
commit: $commit,
|
||||||
@@ -260,9 +284,10 @@ jobs:
|
|||||||
image_tag: $image_tag,
|
image_tag: $image_tag,
|
||||||
digest: $digest,
|
digest: $digest,
|
||||||
image_size: $image_size,
|
image_size: $image_size,
|
||||||
image_size_bytes: $image_size_bytes
|
image_size_bytes: $image_size_bytes,
|
||||||
|
rootfs_sha256: $sha256
|
||||||
}' > "$infofile"
|
}' > "$infofile"
|
||||||
done
|
|
||||||
|
|
||||||
- name: Commit and push build-info if changed
|
- name: Commit and push build-info if changed
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user