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
|
||||
|
||||
build-and-push-rootfs-archives:
|
||||
name: Build rootfs (${{ matrix.version }})
|
||||
name: Build RootFS Archives (${{ matrix.version }})
|
||||
runs-on: vm-docker-build2
|
||||
needs: docker-prune
|
||||
strategy:
|
||||
@@ -142,59 +142,69 @@ jobs:
|
||||
matrix:
|
||||
version: [bullseye, bookworm, trixie]
|
||||
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: |
|
||||
docker build \
|
||||
--build-arg VERSION=${{ matrix.version }} \
|
||||
-t rootfs-${{ matrix.version }} .
|
||||
VERSION=${{ matrix.version }}
|
||||
docker build --build-arg VERSION="$VERSION" -t rootfs-$VERSION .
|
||||
|
||||
- name: Run rootfs bootstrap
|
||||
run: |
|
||||
VERSION=${{ matrix.version }}
|
||||
OUTPUT_DIR=./output/$VERSION
|
||||
|
||||
mkdir -p output
|
||||
docker run --rm --privileged \
|
||||
-v "$(pwd)/output:/output" \
|
||||
-v "$PWD/$OUTPUT_DIR:/output" \
|
||||
-e VERSION="$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
|
||||
echo "[ERROR] output/debian-$VERSION.tar.bz2 missing"
|
||||
ls -lh output || true
|
||||
TAR="$OUTPUT_DIR/debian-$VERSION.tar.bz2"
|
||||
if [[ ! -f "$TAR" ]]; then
|
||||
echo "[ERROR] Rootfs tarball missing: $TAR"
|
||||
ls -lh "$OUTPUT_DIR"
|
||||
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
|
||||
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
|
||||
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: |
|
||||
VERSION=${{ matrix.version }}
|
||||
mkdir -p "upload-repo/$VERSION"
|
||||
cp "./output/$VERSION/debian-$VERSION.tar.bz2" "upload-repo/$VERSION/"
|
||||
|
||||
mkdir -p upload/$VERSION
|
||||
cp "output/debian-$VERSION.tar.bz2" "upload/$VERSION/"
|
||||
|
||||
cd upload
|
||||
sed -i "/debian-$VERSION.tar.bz2/d" sha256sums.txt 2>/dev/null || true
|
||||
- name: Update sha256sums
|
||||
run: |
|
||||
cd upload-repo
|
||||
sed -i "/debian-${{ matrix.version }}.tar.bz2/d" sha256sums.txt 2>/dev/null || true
|
||||
sha256sum "$VERSION/debian-$VERSION.tar.bz2" >> sha256sums.txt
|
||||
|
||||
- name: Commit and push if changed
|
||||
id: commit_archives
|
||||
run: |
|
||||
cd upload
|
||||
git config user.name "$GIT_USERNAME"
|
||||
git config user.email "$GIT_EMAIL"
|
||||
cd upload-repo
|
||||
git config --global user.name "${{ env.GIT_USERNAME }}"
|
||||
git config --global user.email "${{ env.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 add **/*.tar.bz2 sha256sums.txt
|
||||
git commit -m "Update base images and checksum for ${{ matrix.version }} on $(date -u +'%Y-%m-%dT%H:%M:%SZ') [skip ci]"
|
||||
git push
|
||||
echo "archives_changed=true" >> $GITEA_OUTPUT
|
||||
else
|
||||
echo "[INFO] No changes for $VERSION"
|
||||
fi
|
||||
echo "[INFO] No changes to commit."
|
||||
echo "archives_changed=false" >> $GITEA_OUTPUT
|
||||
|
||||
# build-and-push-docker-images:
|
||||
# needs:
|
||||
|
||||
Reference in New Issue
Block a user