Update .gitea/workflows/base-build.yml
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build rootfs (bullseye) (push) Failing after 49s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build rootfs (bookworm) (push) Failing after 2m46s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build rootfs (trixie) (push) Failing after 3m10s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (bullseye) (push) Successful in 2m40s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (bookworm) (push) Successful in 2m51s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Successful in 1m6s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (trixie) (push) Successful in 1m47s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Successful in 1m59s
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build rootfs (bullseye) (push) Failing after 49s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build rootfs (bookworm) (push) Failing after 2m46s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / Build rootfs (trixie) (push) Failing after 3m10s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (bullseye) (push) Successful in 2m40s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (bookworm) (push) Successful in 2m51s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Successful in 1m6s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (trixie) (push) Successful in 1m47s
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Successful in 1m59s
This commit is contained in:
@@ -26,121 +26,272 @@ env:
|
|||||||
OUTPUT_DIR: ./output
|
OUTPUT_DIR: ./output
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-rootfs-archives:
|
# build-and-push-rootfs-archives:
|
||||||
|
# runs-on: vm-docker-build2
|
||||||
|
# outputs:
|
||||||
|
# archives_changed: ${{ steps.commit_archives.outputs.archives_changed }}
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout source
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# - name: Create output directory
|
||||||
|
# run: mkdir -p ./output
|
||||||
|
|
||||||
|
# - name: Build all Debian rootfs versions into volumes and extract
|
||||||
|
# run: |
|
||||||
|
# versions=($VERSIONS)
|
||||||
|
# for version in "${versions[@]}"; do
|
||||||
|
# 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 run --rm --privileged \
|
||||||
|
# -v "$volume_name:/output" \
|
||||||
|
# -e VERSION="$version" \
|
||||||
|
# fithwum/debian-$version-base \
|
||||||
|
# bash -c "/scripts/bootstrap-rootfs.sh \"$version\""
|
||||||
|
|
||||||
|
# # Extract the output file from the volume
|
||||||
|
# container_id=$(docker create -v "$volume_name:/output" debian)
|
||||||
|
# mkdir -p ./output/$version
|
||||||
|
# docker cp "$container_id:/output/$version/debian-$version.tar.bz2" ./output/$version/
|
||||||
|
# docker rm "$container_id"
|
||||||
|
# done
|
||||||
|
|
||||||
|
# - name: Validate that archives exist for each version
|
||||||
|
# run: |
|
||||||
|
# IFS=' ' read -r -a versions <<< "$VERSIONS"
|
||||||
|
# for version in "${versions[@]}"; do
|
||||||
|
# path="./output/$version/debian-$version.tar.bz2"
|
||||||
|
# if [[ ! -f "$path" ]]; then
|
||||||
|
# echo "[ERROR] Missing archive: $path"
|
||||||
|
# exit 1
|
||||||
|
# else
|
||||||
|
# echo "[OK] Found: $path"
|
||||||
|
# fi
|
||||||
|
# done
|
||||||
|
|
||||||
|
# - name: Clone upload repo
|
||||||
|
# run: |
|
||||||
|
# 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: Clean old archives in upload-repo
|
||||||
|
# run: rm -rfv upload-repo/*/*.tar.bz2
|
||||||
|
|
||||||
|
# - name: Copy new archives to upload-repo
|
||||||
|
# run: |
|
||||||
|
# for filepath in ./output/*/debian-*.tar.bz2; do
|
||||||
|
# version_dir=$(basename "$(dirname "$filepath")")
|
||||||
|
# mkdir -p "upload-repo/$version_dir"
|
||||||
|
# cp "$filepath" "upload-repo/$version_dir/"
|
||||||
|
# done
|
||||||
|
|
||||||
|
# - name: Calculate and store sha256sums in upload-repo
|
||||||
|
# run: |
|
||||||
|
# cd upload-repo
|
||||||
|
# rm -f sha256sums.txt
|
||||||
|
# for tarball in */debian-*.tar.bz2; do
|
||||||
|
# echo "[INFO] Processing: $tarball"
|
||||||
|
# checksum=$(sha256sum "$tarball" | awk '{print $1}')
|
||||||
|
# echo "$checksum $tarball" >> sha256sums.txt
|
||||||
|
# done
|
||||||
|
# echo "[INFO] SHA256 contents:"
|
||||||
|
# cat sha256sums.txt
|
||||||
|
|
||||||
|
# - name: Commit and push files if changed
|
||||||
|
# id: commit_archives
|
||||||
|
# run: |
|
||||||
|
# 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 **/*.tar.bz2 sha256sums.txt || true
|
||||||
|
# git commit -m "Update base images and checksum on $(date -u +'%Y-%m-%dT%H:%M:%SZ') [skip ci]"
|
||||||
|
# git push
|
||||||
|
# echo "archives_changed=true" >> $GITHUB_OUTPUT
|
||||||
|
# else
|
||||||
|
# echo "[INFO] No changes to commit."
|
||||||
|
# echo "archives_changed=false" >> $GITHUB_OUTPUT
|
||||||
|
# fi
|
||||||
|
|
||||||
|
build-rootfs:
|
||||||
|
name: Build rootfs (${{ matrix.version }})
|
||||||
runs-on: vm-docker-build2
|
runs-on: vm-docker-build2
|
||||||
outputs:
|
|
||||||
archives_changed: ${{ steps.commit_archives.outputs.archives_changed }}
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version: [bullseye, bookworm, trixie]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Create output directory
|
- name: Build rootfs tarball
|
||||||
run: mkdir -p ./output
|
|
||||||
|
|
||||||
- name: Build all Debian rootfs versions into volumes and extract
|
|
||||||
run: |
|
run: |
|
||||||
versions=($VERSIONS)
|
VERSION=${{ matrix.version }}
|
||||||
for version in "${versions[@]}"; do
|
|
||||||
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 rootfs-$VERSION .
|
||||||
|
|
||||||
docker run --rm --privileged \
|
docker run --rm rootfs-$VERSION \
|
||||||
-v "$volume_name:/output" \
|
bash -c "/scripts/bootstrap-rootfs.sh $VERSION"
|
||||||
-e VERSION="$version" \
|
|
||||||
fithwum/debian-$version-base \
|
|
||||||
bash -c "/scripts/bootstrap-rootfs.sh \"$version\""
|
|
||||||
|
|
||||||
# Extract the output file from the volume
|
test -f "debian-$VERSION.tar.bz2"
|
||||||
container_id=$(docker create -v "$volume_name:/output" debian)
|
|
||||||
mkdir -p ./output/$version
|
|
||||||
docker cp "$container_id:/output/$version/debian-$version.tar.bz2" ./output/$version/
|
|
||||||
docker rm "$container_id"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Validate that archives exist for each version
|
|
||||||
run: |
|
|
||||||
IFS=' ' read -r -a versions <<< "$VERSIONS"
|
|
||||||
for version in "${versions[@]}"; do
|
|
||||||
path="./output/$version/debian-$version.tar.bz2"
|
|
||||||
if [[ ! -f "$path" ]]; then
|
|
||||||
echo "[ERROR] Missing archive: $path"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "[OK] Found: $path"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Clone upload repo
|
- name: Clone upload repo
|
||||||
run: |
|
run: |
|
||||||
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
|
git clone --depth=1 \
|
||||||
git clone --depth=1 "https://${{ env.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/debian-base.git" upload-repo
|
https://${GIT_USERNAME}:${GIT_TOKEN}@gitea.fithwum.tech/fithwum/debian-base.git upload
|
||||||
|
|
||||||
- name: Clean old archives in upload-repo
|
- name: Update archive + sha256
|
||||||
run: rm -rfv upload-repo/*/*.tar.bz2
|
|
||||||
|
|
||||||
- name: Copy new archives to upload-repo
|
|
||||||
run: |
|
run: |
|
||||||
for filepath in ./output/*/debian-*.tar.bz2; do
|
VERSION=${{ matrix.version }}
|
||||||
version_dir=$(basename "$(dirname "$filepath")")
|
|
||||||
mkdir -p "upload-repo/$version_dir"
|
|
||||||
cp "$filepath" "upload-repo/$version_dir/"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Calculate and store sha256sums in upload-repo
|
mkdir -p upload/$VERSION
|
||||||
run: |
|
cp "debian-$VERSION.tar.bz2" "upload/$VERSION/"
|
||||||
cd upload-repo
|
|
||||||
rm -f sha256sums.txt
|
|
||||||
for tarball in */debian-*.tar.bz2; do
|
|
||||||
echo "[INFO] Processing: $tarball"
|
|
||||||
checksum=$(sha256sum "$tarball" | awk '{print $1}')
|
|
||||||
echo "$checksum $tarball" >> sha256sums.txt
|
|
||||||
done
|
|
||||||
echo "[INFO] SHA256 contents:"
|
|
||||||
cat sha256sums.txt
|
|
||||||
|
|
||||||
- name: Commit and push files if changed
|
cd upload
|
||||||
id: commit_archives
|
sed -i "/debian-$VERSION.tar.bz2/d" sha256sums.txt 2>/dev/null || true
|
||||||
|
sha256sum "$VERSION/debian-$VERSION.tar.bz2" >> sha256sums.txt
|
||||||
|
|
||||||
|
- name: Commit if changed
|
||||||
run: |
|
run: |
|
||||||
cd upload-repo
|
VERSION=${{ matrix.version }}
|
||||||
git config --global user.name "${{ env.GIT_USERNAME }}"
|
|
||||||
git config --global user.email "${{ env.GIT_EMAIL }}"
|
cd upload
|
||||||
|
git config user.name "$GIT_USERNAME"
|
||||||
|
git config user.email "$GIT_EMAIL"
|
||||||
|
|
||||||
if git status --porcelain | grep .; then
|
if git status --porcelain | grep .; then
|
||||||
git add **/*.tar.bz2 sha256sums.txt || true
|
git add "$VERSION/debian-$VERSION.tar.bz2" sha256sums.txt
|
||||||
git commit -m "Update base images and checksum on $(date -u +'%Y-%m-%dT%H:%M:%SZ') [skip ci]"
|
git commit -m "Update rootfs for $VERSION [skip ci]"
|
||||||
git push
|
git push
|
||||||
echo "archives_changed=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
else
|
||||||
echo "[INFO] No changes to commit."
|
echo "[INFO] No changes for $VERSION"
|
||||||
echo "archives_changed=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# build-and-push-docker-images:
|
||||||
|
# needs: build-and-push-rootfs-archives
|
||||||
|
# if: always()
|
||||||
|
# # if: needs.build-and-push-rootfs-archives.outputs.archives_changed == 'true'
|
||||||
|
# runs-on: vm-docker-build2
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout source
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# - name: Wait for archives to appear in upload repo
|
||||||
|
# run: |
|
||||||
|
# echo "[INFO] Waiting for archives to appear in upload-repo..."
|
||||||
|
|
||||||
|
# mkdir -p temp-check
|
||||||
|
# cd temp-check
|
||||||
|
|
||||||
|
# # Retry loop for cloning the upload-repo
|
||||||
|
# for i in {1..10}; do
|
||||||
|
# echo "[INFO] Attempt $i: Cloning upload-repo..."
|
||||||
|
# if git clone --depth=1 "https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_TOKEN }}@gitea.fithwum.tech/fithwum/debian-base.git"; then
|
||||||
|
# break
|
||||||
|
# fi
|
||||||
|
# echo "[WARN] Clone failed. Retrying in 10 seconds..."
|
||||||
|
# sleep 10
|
||||||
|
# done
|
||||||
|
|
||||||
|
# if [ ! -d "debian-base" ]; then
|
||||||
|
# echo "[ERROR] Failed to clone upload-repo after retries."
|
||||||
|
# exit 1
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# cd debian-base
|
||||||
|
|
||||||
|
# # Wait for all versions to show up
|
||||||
|
# missing_versions=()
|
||||||
|
# for version in $VERSIONS; do
|
||||||
|
# found=0
|
||||||
|
# for i in {1..30}; do
|
||||||
|
# if [[ -f "$version/debian-$version.tar.bz2" ]]; then
|
||||||
|
# found=1
|
||||||
|
# break
|
||||||
|
# else
|
||||||
|
# echo "[WAIT] $version not ready yet, sleeping 10s..."
|
||||||
|
# sleep 10
|
||||||
|
# fi
|
||||||
|
# done
|
||||||
|
|
||||||
|
# if [[ $found -eq 0 ]]; then
|
||||||
|
# missing_versions+=("$version")
|
||||||
|
# fi
|
||||||
|
# done
|
||||||
|
|
||||||
|
# if [[ ${#missing_versions[@]} -gt 0 ]]; then
|
||||||
|
# echo "[ERROR] Missing archives for: ${missing_versions[*]}"
|
||||||
|
# exit 1
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# - name: Generate Dockerfiles per version (if missing)
|
||||||
|
# run: |
|
||||||
|
# for version in $VERSIONS; do
|
||||||
|
# mkdir -p "$version"
|
||||||
|
# DOCKERFILE_PATH="$version/Dockerfile"
|
||||||
|
|
||||||
|
# if [[ -f "$DOCKERFILE_PATH" ]]; then
|
||||||
|
# echo "[INFO] Skipping $DOCKERFILE_PATH (already exists)"
|
||||||
|
# continue
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# printf '%s\n' \
|
||||||
|
# "FROM scratch" \
|
||||||
|
# "LABEL maintainer=\"fithwum\"" \
|
||||||
|
# "ADD debian-$version.tar.bz2 /" \
|
||||||
|
# "CMD [\"/bin/bash\"]" > "$DOCKERFILE_PATH"
|
||||||
|
|
||||||
|
# echo "[INFO] Created $DOCKERFILE_PATH"
|
||||||
|
# done
|
||||||
|
|
||||||
|
# - name: Set up Docker Buildx
|
||||||
|
# uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
# - name: Log in to Gitea Registry
|
||||||
|
# run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitea.fithwum.tech -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||||
|
|
||||||
|
# - name: Build and push Docker images
|
||||||
|
# run: |
|
||||||
|
# IMAGE_REGISTRY=gitea.fithwum.tech
|
||||||
|
# IMAGE_ORG=fithwum
|
||||||
|
# IMAGE_REPO=debian-base
|
||||||
|
|
||||||
|
# for TAG in $VERSIONS; do
|
||||||
|
# FULL_IMAGE="${IMAGE_REGISTRY}/${IMAGE_ORG}/${IMAGE_REPO}:${TAG}"
|
||||||
|
# echo "[INFO] Building and pushing $FULL_IMAGE"
|
||||||
|
# docker buildx build --platform linux/amd64 --push -t "$FULL_IMAGE" "./$TAG"
|
||||||
|
# done
|
||||||
|
|
||||||
build-and-push-docker-images:
|
build-and-push-docker-images:
|
||||||
needs: build-and-push-rootfs-archives
|
needs: build-and-push-rootfs-archives
|
||||||
if: always()
|
if: always()
|
||||||
# if: needs.build-and-push-rootfs-archives.outputs.archives_changed == 'true'
|
|
||||||
runs-on: vm-docker-build2
|
runs-on: vm-docker-build2
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: [bullseye, bookworm, trixie] # replace with your $VERSIONS
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Wait for archives to appear in upload repo
|
- name: Wait for archives to appear in upload repo
|
||||||
run: |
|
run: |
|
||||||
echo "[INFO] Waiting for archives to appear in upload-repo..."
|
echo "[INFO] Waiting for archive for ${{ matrix.version }}..."
|
||||||
|
mkdir -p temp-check && cd temp-check
|
||||||
|
|
||||||
mkdir -p temp-check
|
|
||||||
cd temp-check
|
|
||||||
|
|
||||||
# Retry loop for cloning the upload-repo
|
|
||||||
for i in {1..10}; do
|
for i in {1..10}; do
|
||||||
echo "[INFO] Attempt $i: Cloning upload-repo..."
|
echo "[INFO] Attempt $i: Cloning upload-repo..."
|
||||||
if git clone --depth=1 "https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_TOKEN }}@gitea.fithwum.tech/fithwum/debian-base.git"; then
|
if git clone --depth=1 "https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_TOKEN }}@gitea.fithwum.tech/fithwum/debian-base.git"; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo "[WARN] Clone failed. Retrying in 10 seconds..."
|
echo "[WARN] Clone failed. Retrying in 10s..."
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -151,49 +302,37 @@ jobs:
|
|||||||
|
|
||||||
cd debian-base
|
cd debian-base
|
||||||
|
|
||||||
# Wait for all versions to show up
|
# Wait for this version's archive
|
||||||
missing_versions=()
|
|
||||||
for version in $VERSIONS; do
|
|
||||||
found=0
|
|
||||||
for i in {1..30}; do
|
for i in {1..30}; do
|
||||||
if [[ -f "$version/debian-$version.tar.bz2" ]]; then
|
if [[ -f "${{ matrix.version }}/debian-${{ matrix.version }}.tar.bz2" ]]; then
|
||||||
found=1
|
echo "[OK] Found archive for ${{ matrix.version }}"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
echo "[WAIT] $version not ready yet, sleeping 10s..."
|
echo "[WAIT] ${{ matrix.version }} not ready yet, sleeping 10s..."
|
||||||
sleep 10
|
sleep 10
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $found -eq 0 ]]; then
|
if [[ ! -f "${{ matrix.version }}/debian-${{ matrix.version }}.tar.bz2" ]]; then
|
||||||
missing_versions+=("$version")
|
echo "[ERROR] Missing archive for ${{ matrix.version }}"
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ ${#missing_versions[@]} -gt 0 ]]; then
|
|
||||||
echo "[ERROR] Missing archives for: ${missing_versions[*]}"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Generate Dockerfiles per version (if missing)
|
- name: Generate Dockerfile for ${{ matrix.version }}
|
||||||
run: |
|
run: |
|
||||||
for version in $VERSIONS; do
|
mkdir -p "${{ matrix.version }}"
|
||||||
mkdir -p "$version"
|
DOCKERFILE_PATH="${{ matrix.version }}/Dockerfile"
|
||||||
DOCKERFILE_PATH="$version/Dockerfile"
|
|
||||||
|
|
||||||
if [[ -f "$DOCKERFILE_PATH" ]]; then
|
|
||||||
echo "[INFO] Skipping $DOCKERFILE_PATH (already exists)"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [[ ! -f "$DOCKERFILE_PATH" ]]; then
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
"FROM scratch" \
|
"FROM scratch" \
|
||||||
"LABEL maintainer=\"fithwum\"" \
|
"LABEL maintainer=\"fithwum\"" \
|
||||||
"ADD debian-$version.tar.bz2 /" \
|
"ADD debian-${{ matrix.version }}.tar.bz2 /" \
|
||||||
"CMD [\"/bin/bash\"]" > "$DOCKERFILE_PATH"
|
"CMD [\"/bin/bash\"]" > "$DOCKERFILE_PATH"
|
||||||
|
|
||||||
echo "[INFO] Created $DOCKERFILE_PATH"
|
echo "[INFO] Created $DOCKERFILE_PATH"
|
||||||
done
|
else
|
||||||
|
echo "[INFO] Dockerfile already exists for ${{ matrix.version }}"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -201,17 +340,14 @@ jobs:
|
|||||||
- name: Log in to Gitea Registry
|
- name: Log in to Gitea Registry
|
||||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitea.fithwum.tech -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitea.fithwum.tech -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||||
|
|
||||||
- name: Build and push Docker images
|
- name: Build and push Docker image for ${{ matrix.version }}
|
||||||
run: |
|
run: |
|
||||||
IMAGE_REGISTRY=gitea.fithwum.tech
|
IMAGE_REGISTRY=gitea.fithwum.tech
|
||||||
IMAGE_ORG=fithwum
|
IMAGE_ORG=fithwum
|
||||||
IMAGE_REPO=debian-base
|
IMAGE_REPO=debian-base
|
||||||
|
FULL_IMAGE="${IMAGE_REGISTRY}/${IMAGE_ORG}/${IMAGE_REPO}:${{ matrix.version }}"
|
||||||
for TAG in $VERSIONS; do
|
|
||||||
FULL_IMAGE="${IMAGE_REGISTRY}/${IMAGE_ORG}/${IMAGE_REPO}:${TAG}"
|
|
||||||
echo "[INFO] Building and pushing $FULL_IMAGE"
|
echo "[INFO] Building and pushing $FULL_IMAGE"
|
||||||
docker buildx build --platform linux/amd64 --push -t "$FULL_IMAGE" "./$TAG"
|
docker buildx build --platform linux/amd64 --push -t "$FULL_IMAGE" "./${{ matrix.version }}"
|
||||||
done
|
|
||||||
|
|
||||||
generate-changelogs:
|
generate-changelogs:
|
||||||
needs: build-and-push-rootfs-archives
|
needs: build-and-push-rootfs-archives
|
||||||
|
|||||||
Reference in New Issue
Block a user