test
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-rootfs-per-version (push) Failing after 31s
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. / build-and-push-docker-images (push) Successful in 20s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Successful in 20s
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-rootfs-per-version (push) Failing after 31s
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. / build-and-push-docker-images (push) Successful in 20s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Successful in 20s
This commit is contained in:
23
base-image-script/upload-rootfs.sh
Normal file
23
base-image-script/upload-rootfs.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
VERSION="$1"
|
||||
|
||||
REPO_URL="https://${GIT_USERNAME}:${GIT_PASSWORD}@gitea.fithwum.tech/fithwum/debian-base.git"
|
||||
git clone --depth=1 "$REPO_URL" upload-repo
|
||||
|
||||
rm -rfv "upload-repo/$VERSION/*.tar.bz2"
|
||||
mkdir -p "upload-repo/$VERSION"
|
||||
cp "output/$VERSION/debian-$VERSION.tar.bz2" "upload-repo/$VERSION/"
|
||||
|
||||
cd upload-repo
|
||||
sha256sum "$VERSION/debian-$VERSION.tar.bz2" > sha256sums.txt
|
||||
|
||||
git config user.name "$GIT_USERNAME"
|
||||
git config user.email "ci@gitea.fithwum.tech"
|
||||
if git status --porcelain | grep .; then
|
||||
git add "$VERSION/*.tar.bz2" sha256sums.txt
|
||||
git commit -m "Update $VERSION archive"
|
||||
git push
|
||||
else
|
||||
echo "[INFO] No changes to commit."
|
||||
fi
|
||||
Reference in New Issue
Block a user