fgsdfgsdfgdsfg
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Docker prune (vm-docker-build2) (push) Successful in 3s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build RootFS Archives (bullseye) (push) Has started running
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build RootFS Archives (bookworm) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bookworm) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bullseye) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (trixie) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build RootFS Archives (trixie) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Has been cancelled
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Docker prune (vm-docker-build2) (push) Successful in 3s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build RootFS Archives (bullseye) (push) Has started running
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build RootFS Archives (bookworm) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bookworm) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (bullseye) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build & Push Docker Images (trixie) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build RootFS Archives (trixie) (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Has been cancelled
This commit is contained in:
@@ -134,7 +134,7 @@ jobs:
|
|||||||
# fi
|
# fi
|
||||||
|
|
||||||
build-and-push-rootfs-archives:
|
build-and-push-rootfs-archives:
|
||||||
name: Build rootfs (${{ matrix.version }})
|
name: Build RootFS Archives (${{ matrix.version }})
|
||||||
runs-on: vm-docker-build2
|
runs-on: vm-docker-build2
|
||||||
needs: docker-prune
|
needs: docker-prune
|
||||||
strategy:
|
strategy:
|
||||||
@@ -142,59 +142,69 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
version: [bullseye, bookworm, trixie]
|
version: [bullseye, bookworm, trixie]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout source
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build rootfs image
|
- name: Create output directory for version
|
||||||
|
run: mkdir -p ./output/${{ matrix.version }}
|
||||||
|
|
||||||
|
- name: Build rootfs Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
VERSION=${{ matrix.version }}
|
||||||
--build-arg VERSION=${{ matrix.version }} \
|
docker build --build-arg VERSION="$VERSION" -t rootfs-$VERSION .
|
||||||
-t rootfs-${{ matrix.version }} .
|
|
||||||
|
|
||||||
- name: Run rootfs bootstrap
|
- name: Run rootfs bootstrap
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ matrix.version }}
|
VERSION=${{ matrix.version }}
|
||||||
|
OUTPUT_DIR=./output/$VERSION
|
||||||
|
|
||||||
mkdir -p output
|
|
||||||
docker run --rm --privileged \
|
docker run --rm --privileged \
|
||||||
-v "$(pwd)/output:/output" \
|
-v "$PWD/$OUTPUT_DIR:/output" \
|
||||||
|
-e VERSION="$VERSION" \
|
||||||
rootfs-$VERSION \
|
rootfs-$VERSION \
|
||||||
bash -c "/scripts/bootstrap-rootfs.sh $VERSION"
|
bash -c "/scripts/bootstrap-rootfs.sh $VERSION /output"
|
||||||
|
|
||||||
if [[ ! -f "output/debian-$VERSION.tar.bz2" ]]; then
|
TAR="$OUTPUT_DIR/debian-$VERSION.tar.bz2"
|
||||||
echo "[ERROR] output/debian-$VERSION.tar.bz2 missing"
|
if [[ ! -f "$TAR" ]]; then
|
||||||
ls -lh output || true
|
echo "[ERROR] Rootfs tarball missing: $TAR"
|
||||||
|
ls -lh "$OUTPUT_DIR"
|
||||||
exit 1
|
exit 1
|
||||||
|
else
|
||||||
|
echo "[OK] Created $TAR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Clone upload repo
|
- name: Clone upload repo
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 \
|
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
|
||||||
https://${GIT_USERNAME}:${GIT_TOKEN}@gitea.fithwum.tech/fithwum/debian-base.git upload
|
git clone --depth=1 "https://${{ env.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/debian-base.git" upload-repo
|
||||||
|
|
||||||
- name: Update archive + sha256
|
- name: Copy new archive into upload repo
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ matrix.version }}
|
VERSION=${{ matrix.version }}
|
||||||
|
mkdir -p "upload-repo/$VERSION"
|
||||||
|
cp "./output/$VERSION/debian-$VERSION.tar.bz2" "upload-repo/$VERSION/"
|
||||||
|
|
||||||
mkdir -p upload/$VERSION
|
- name: Update sha256sums
|
||||||
cp "output/debian-$VERSION.tar.bz2" "upload/$VERSION/"
|
run: |
|
||||||
|
cd upload-repo
|
||||||
cd upload
|
sed -i "/debian-${{ matrix.version }}.tar.bz2/d" sha256sums.txt 2>/dev/null || true
|
||||||
sed -i "/debian-$VERSION.tar.bz2/d" sha256sums.txt 2>/dev/null || true
|
|
||||||
sha256sum "$VERSION/debian-$VERSION.tar.bz2" >> sha256sums.txt
|
sha256sum "$VERSION/debian-$VERSION.tar.bz2" >> sha256sums.txt
|
||||||
|
|
||||||
- name: Commit and push if changed
|
- name: Commit and push if changed
|
||||||
|
id: commit_archives
|
||||||
run: |
|
run: |
|
||||||
cd upload
|
cd upload-repo
|
||||||
git config user.name "$GIT_USERNAME"
|
git config --global user.name "${{ env.GIT_USERNAME }}"
|
||||||
git config user.email "$GIT_EMAIL"
|
git config --global user.email "${{ env.GIT_EMAIL }}"
|
||||||
|
|
||||||
if git status --porcelain | grep .; then
|
if git status --porcelain | grep .; then
|
||||||
git add "$VERSION/debian-$VERSION.tar.bz2" sha256sums.txt
|
git add **/*.tar.bz2 sha256sums.txt
|
||||||
git commit -m "Update rootfs for $VERSION [skip ci]"
|
git commit -m "Update base images and checksum for ${{ matrix.version }} on $(date -u +'%Y-%m-%dT%H:%M:%SZ') [skip ci]"
|
||||||
git push
|
git push
|
||||||
|
echo "archives_changed=true" >> $GITEA_OUTPUT
|
||||||
else
|
else
|
||||||
echo "[INFO] No changes for $VERSION"
|
echo "[INFO] No changes to commit."
|
||||||
fi
|
echo "archives_changed=false" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
# build-and-push-docker-images:
|
# build-and-push-docker-images:
|
||||||
# needs:
|
# needs:
|
||||||
|
|||||||
Reference in New Issue
Block a user