This commit is contained in:
2025-07-05 19:52:54 -07:00
parent 19a318b87e
commit 5d821cb94f

View File

@@ -174,27 +174,23 @@ jobs:
run: git clone "${{ env.REPO_URL }}" upload-repo run: git clone "${{ env.REPO_URL }}" upload-repo
- name: Generate build-info.json per version - name: Generate build-info.json per version
run: | run: |
cd upload-repo for version in buster bullseye bookworm docker-build; do
for version in buster bullseye bookworm docker-build; do echo "[INFO] Generating build-info.json for $version"
echo "[INFO] Generating build-info.json for $version" mkdir -p "$version"
mkdir -p "$version" infofile="$version/build-info.json"
infofile="$version/build-info.json"
cat <<'EOF' > "$infofile" cat <<EOF > "$infofile"
{ {
"version": "__VERSION__", "version": "$version",
"commit": "__COMMIT__", "commit": "$(git rev-parse HEAD)",
"build_time": "__BUILD_TIME__", "build_time": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')",
"image_tag": "__IMAGE_TAG__" "image_tag": "gitea.fithwum.tech/fithwum/debian-base:$version"
} }
EOF EOF
done
# Now replace placeholders
sed -i "s/__VERSION__/$version/" "$infofile"
sed -i "s|__COMMIT__|$(git rev-parse HEAD)|" "$infofile"
sed -i "s|__BUILD_TIME__|$(date -u +'%Y-%m-%dT%H:%M:%SZ')|" "$infofile"
sed -i "s|__IMAGE_TAG__|gitea.fithwum.tech/fithwum/debian-base:$version|" "$infofile"
done
- name: Commit and push metadata if changed - name: Commit and push metadata if changed