73 Commits
Author SHA1 Message Date
fithwum c4687dce6a Merge build-info updates 2026-08-16 22:06:57 +00:00
fithwum 983e5d98d8 Update build-info on 2026-08-16T22:06:56Z [skip ci] 2026-08-16 22:06:56 +00:00
fithwum 189cd8106b Merge changelog updates 2026-08-16 22:06:47 +00:00
fithwum 992f646b1e Update changelogs on 2026-08-16T22:06:45Z [skip ci] 2026-08-16 22:06:45 +00:00
fithwum d452101164 Merge build-info updates 2026-08-09 22:12:04 +00:00
fithwum 698dc94bb6 Update build-info on 2026-08-09T22:12:04Z [skip ci] 2026-08-09 22:12:04 +00:00
fithwum 7f3f010574 Merge changelog updates 2026-08-09 22:11:53 +00:00
fithwum 89bb1c5ec4 Update changelogs on 2026-08-09T22:11:52Z [skip ci] 2026-08-09 22:11:52 +00:00
fithwum 057d7761ef Merge build-info updates 2026-08-09 22:06:55 +00:00
fithwum cd1d9d70ce Update build-info on 2026-08-09T22:06:54Z [skip ci] 2026-08-09 22:06:54 +00:00
fithwum 81562d7d0d Merge changelog updates 2026-08-09 22:06:45 +00:00
fithwum c5f276cc59 Update changelogs on 2026-08-09T22:06:43Z [skip ci] 2026-08-09 22:06:43 +00:00
fithwum 1d5ca167c6 Merge build-info updates 2026-08-02 22:11:32 +00:00
fithwum e4395a8cb7 Update build-info on 2026-08-02T22:11:31Z [skip ci] 2026-08-02 22:11:31 +00:00
fithwum 5002ba5dd2 Merge changelog updates 2026-08-02 22:11:22 +00:00
fithwum 86f8c38a55 Update changelogs on 2026-08-02T22:11:21Z [skip ci] 2026-08-02 22:11:21 +00:00
fithwum f2439bd22e Merge build-info updates 2026-08-02 22:06:17 +00:00
fithwum 78d0a0f2f6 Update build-info on 2026-08-02T22:06:16Z [skip ci] 2026-08-02 22:06:16 +00:00
fithwum a6973ec997 Merge changelog updates 2026-08-02 22:06:07 +00:00
fithwum 879768d121 Update changelogs on 2026-08-02T22:06:06Z [skip ci] 2026-08-02 22:06:06 +00:00
fithwum 3b98ed883b updates 2026-07-30 09:54:40 -07:00
fithwum 3497cde9b2 Merge build-info updates 2026-07-29 22:44:48 +00:00
fithwum ff007aded7 Update build-info on 2026-07-29T22:44:47Z [skip ci] 2026-07-29 22:44:47 +00:00
fithwum 7eab189f79 Merge changelog updates 2026-07-29 22:44:16 +00:00
fithwum 4a4094e253 Update changelogs on 2026-07-29T22:44:14Z [skip ci] 2026-07-29 22:44:14 +00:00
fithwum 2d7f2d37d9 updates
vintage-story-build-latest / Docker prune (vm-docker-build2) (push) Successful in 3s
vintage-story-build-latest / Build and Push latest (push) Successful in 42s
vintage-story-build-latest / generate-changelogs (push) Successful in 11s
vintage-story-build-latest / generate-build-info (push) Successful in 29s
2026-07-29 15:43:09 -07:00
fithwum 9db2129e0c Merge build-info updates 2026-07-29 17:51:25 +00:00
fithwum b0b3caf632 Update build-info on 2026-07-29T17:51:25Z [skip ci] 2026-07-29 17:51:25 +00:00
fithwum c93ea996c2 Merge changelog updates 2026-07-29 17:51:12 +00:00
fithwum 2f2d584159 Update changelogs on 2026-07-29T17:51:11Z [skip ci] 2026-07-29 17:51:11 +00:00
fithwum aa18b753a3 update
vintage-story-build-testing / Docker prune (vm-docker-build2) (push) Successful in 2s
vintage-story-build-testing / Build and Push testing (push) Successful in 41s
vintage-story-build-testing / generate-changelogs (push) Successful in 8s
vintage-story-build-testing / generate-build-info (push) Successful in 12s
2026-07-29 10:50:09 -07:00
fithwum daf1a0019c Merge build-info updates 2026-07-29 16:11:29 +00:00
fithwum 70a8dd8d2e Update build-info on 2026-07-29T16:11:28Z [skip ci] 2026-07-29 16:11:28 +00:00
fithwum 6ea0b9fb34 Merge build-info updates 2026-07-29 16:11:17 +00:00
fithwum 0fb5b73aeb Update build-info on 2026-07-29T16:11:16Z [skip ci] 2026-07-29 16:11:16 +00:00
fithwum 125a118938 Merge changelog updates 2026-07-29 16:11:14 +00:00
fithwum 39a71076c0 Update changelogs on 2026-07-29T16:11:13Z [skip ci] 2026-07-29 16:11:13 +00:00
fithwum 4ecd0e69a9 Merge changelog updates 2026-07-29 16:11:06 +00:00
fithwum 99589af9ad Update changelogs on 2026-07-29T16:11:05Z [skip ci] 2026-07-29 16:11:05 +00:00
fithwum 74cd0b5bb2 updates to add auto update
vintage-story-build-latest / Docker prune (vm-docker-build2) (push) Successful in 52s
vintage-story-build-testing / Docker prune (vm-docker-build2) (push) Successful in 59s
vintage-story-build-latest / Build and Push latest (push) Successful in 1m6s
vintage-story-build-testing / Build and Push testing (push) Successful in 1m4s
vintage-story-build-latest / generate-changelogs (push) Successful in 9s
vintage-story-build-testing / generate-changelogs (push) Successful in 8s
vintage-story-build-latest / generate-build-info (push) Successful in 10s
vintage-story-build-testing / generate-build-info (push) Successful in 11s
2026-07-29 09:08:51 -07:00
fithwum f5ede67568 Merge build-info updates 2026-07-29 01:59:54 +00:00
fithwum ab726bedc9 Update build-info on 2026-07-29T01:59:53Z [skip ci] 2026-07-29 01:59:53 +00:00
fithwum 864062b178 Merge changelog updates 2026-07-29 01:59:41 +00:00
fithwum d58c32fb5c Update changelogs on 2026-07-29T01:59:39Z [skip ci] 2026-07-29 01:59:39 +00:00
fithwum 277cf599cf update
vintage-story-build-latest / Docker prune (vm-docker-build2) (push) Successful in 3s
vintage-story-build-latest / Build and Push latest (push) Successful in 48s
vintage-story-build-latest / generate-changelogs (push) Successful in 12s
vintage-story-build-latest / generate-build-info (push) Successful in 11s
2026-07-28 18:58:29 -07:00
fithwum 02ed1772ce Merge build-info updates 2026-07-29 01:57:50 +00:00
fithwum a0b50b09d2 Update build-info on 2026-07-29T01:57:48Z [skip ci] 2026-07-29 01:57:48 +00:00
fithwum 9c696f7920 Merge changelog updates 2026-07-29 01:57:32 +00:00
fithwum ce5079969e Update changelogs on 2026-07-29T01:57:31Z [skip ci] 2026-07-29 01:57:31 +00:00
fithwum c13766827c Merge build-info updates 2026-07-29 01:57:19 +00:00
fithwum 03c6884f0f Update build-info on 2026-07-29T01:57:17Z [skip ci] 2026-07-29 01:57:17 +00:00
fithwum ed390dd3dc Merge changelog updates 2026-07-29 01:57:04 +00:00
fithwum d21e5ca6dd Update changelogs on 2026-07-29T01:57:02Z [skip ci] 2026-07-29 01:57:02 +00:00
fithwum 4b7fdf59fe updates
vintage-story-build-latest / Docker prune (vm-docker-build2) (push) Successful in 4s
vintage-story-build-latest / Build and Push latest (push) Successful in 1m5s
vintage-story-build-latest / generate-changelogs (push) Successful in 13s
vintage-story-build-testing / Docker prune (vm-docker-build2) (push) Successful in 3s
vintage-story-build-testing / Build and Push testing (push) Successful in 1m3s
vintage-story-build-latest / generate-build-info (push) Successful in 15s
vintage-story-build-testing / generate-changelogs (push) Successful in 10s
vintage-story-build-testing / generate-build-info (push) Successful in 16s
2026-07-28 18:55:31 -07:00
fithwum d3417773b8 updates
vintage-story-build-testing / Docker prune (vm-docker-build2) (push) Successful in 3s
vintage-story-build-latest / Docker prune (vm-docker-build2) (push) Successful in 4s
vintage-story-build-latest / poll-and-detect-changes (push) Successful in 6s
vintage-story-build-latest / Build and Push latest (push) Skipped
vintage-story-build-testing / poll-and-detect-changes (push) Successful in 6s
vintage-story-build-latest / generate-changelogs (push) Skipped
vintage-story-build-latest / generate-build-info (push) Skipped
vintage-story-build-testing / Build and Push testing (push) Skipped
vintage-story-build-testing / generate-changelogs (push) Skipped
vintage-story-build-testing / generate-build-info (push) Skipped
2026-07-28 18:50:55 -07:00
fithwum 791e9b7c48 Merge build-info updates 2026-07-28 18:55:17 +00:00
fithwum b37f6936d1 Update build-info on 2026-07-28T18:55:15Z [skip ci] 2026-07-28 18:55:15 +00:00
fithwum 2d81ab8f90 Merge build-info updates 2026-07-28 18:55:13 +00:00
fithwum e44b12f26e Update build-info on 2026-07-28T18:55:12Z [skip ci] 2026-07-28 18:55:12 +00:00
fithwum bf7e754e81 Merge changelog updates 2026-07-28 18:55:03 +00:00
fithwum c3110979a1 Update changelogs on 2026-07-28T18:55:01Z [skip ci] 2026-07-28 18:55:02 +00:00
fithwum 1145e40d08 Merge changelog updates 2026-07-28 18:55:01 +00:00
fithwum 9eb203bd47 Update changelogs on 2026-07-28T18:55:00Z [skip ci] 2026-07-28 18:55:00 +00:00
fithwum e8dc20eacc update and add testing build
vintage-story-build-latest / Docker prune (vm-docker-build2) (push) Successful in 3s
vintage-story-build-testing / Docker prune (vm-docker-build2) (push) Successful in 3s
vintage-story-build-latest / poll-debian-base-and-detect-changes (push) Successful in 7s
vintage-story-build-testing / poll-debian-base-and-detect-changes (push) Successful in 7s
vintage-story-build-latest / Build and Push latest (push) Successful in 32s
vintage-story-build-testing / Build and Push testing (push) Successful in 30s
vintage-story-build-latest / generate-changelogs (push) Successful in 8s
vintage-story-build-testing / generate-changelogs (push) Successful in 10s
vintage-story-build-latest / generate-build-info (push) Successful in 10s
vintage-story-build-testing / generate-build-info (push) Successful in 10s
2026-07-28 11:54:00 -07:00
fithwum 68d63fec74 Merge build-info updates 2026-07-28 18:48:04 +00:00
fithwum 88137ab0d5 Update build-info on 2026-07-28T18:48:03Z [skip ci] 2026-07-28 18:48:03 +00:00
fithwum ed63deec0b Merge changelog updates 2026-07-28 18:47:54 +00:00
fithwum 14c37d1e66 Update changelogs on 2026-07-28T18:47:53Z [skip ci] 2026-07-28 18:47:53 +00:00
fithwum a09fe6326b update
vintage-story-build-latest / Docker prune (vm-docker-build2) (push) Successful in 3s
vintage-story-build-latest / poll-debian-base-and-detect-changes (push) Successful in 6s
vintage-story-build-latest / Build and Push latest (push) Successful in 27s
vintage-story-build-latest / generate-changelogs (push) Successful in 7s
vintage-story-build-latest / generate-build-info (push) Successful in 10s
2026-07-28 11:47:00 -07:00
fithwum 211d66b353 Merge build-info updates 2026-07-28 18:35:10 +00:00
fithwum 2d46ec0f7c Update build-info on 2026-07-28T18:35:09Z [skip ci] 2026-07-28 18:35:09 +00:00
fithwum 83441fe6ce Merge changelog updates 2026-07-28 18:34:56 +00:00
fithwum 9790e7dbd9 Update changelogs on 2026-07-28T18:34:55Z [skip ci] 2026-07-28 18:34:55 +00:00
14 changed files with 606 additions and 163 deletions
-1
View File
@@ -1 +0,0 @@
gitea.fithwum.tech/fithwum/debian-base@sha256:4023732c1234033dd440901f801b44288d6acd1c2d9db5918b104028dbfbc31a
+2 -103
View File
@@ -12,7 +12,7 @@ on:
- '!latest/CHANGES.md'
- '!latest/build-info.json'
schedule:
- cron: '5 22 * * 0'
- cron: '10 22 * * 0'
env:
IMAGE_REGISTRY: gitea.fithwum.tech
@@ -38,110 +38,9 @@ jobs:
echo "[INFO] Pruning Docker images on ${{ matrix.runner }}..."
docker image prune -a -f || true
poll-debian-base-and-detect-changes:
runs-on: vm-docker-build2
needs: docker-prune
outputs:
digest_changed: ${{ steps.compare_digest.outputs.changed }}
versions_changed: ${{ steps.check_changed_versions.outputs.versions_changed }}
new_versions: ${{ steps.check_new_versions.outputs.new_versions }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Ensure .cache exists
run: mkdir -p .cache && touch .cache/.gitkeep
- name: Log in to Gitea Registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitea.fithwum.tech -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Get current digest of debian-base image
id: get_digest
run: |
IMAGE="${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_ORG }}/${{ env.IMAGE_REPO_DEBIAN }}:${{ env.IMAGE_TAG_DEBIAN }}"
docker pull "$IMAGE" > /dev/null
DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
echo "$DIGEST" > .cache/debian-base.digest.new
- name: Compare with stored digest
id: compare_digest
run: |
CURRENT_DIGEST="${{ steps.get_digest.outputs.digest }}"
LAST_DIGEST="$(cat ${{ env.DIGEST_FILE }} 2>/dev/null || echo '')"
if [ "$CURRENT_DIGEST" = "$LAST_DIGEST" ]; then
echo "[INFO] Digest unchanged"
echo "changed=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "[INFO] Digest changed → updating cache"
echo "$CURRENT_DIGEST" > ${{ env.DIGEST_FILE }}
git config user.name "${{ secrets.GIT_USERNAME }}"
git config user.email "${{ secrets.GIT_EMAIL }}"
git add ${{ env.DIGEST_FILE }}
git commit -m "Update base digest to $CURRENT_DIGEST" || true
# --- Safe rebase with auto conflict resolution ---
git fetch origin main
if ! git rebase --strategy-option=theirs origin/main; then
echo "[WARN] Rebase conflict, auto-resolving by preferring local digest"
git rebase --abort
git fetch origin main
git reset --hard origin/main
echo "$CURRENT_DIGEST" > ${{ env.DIGEST_FILE }}
git add ${{ env.DIGEST_FILE }}
git commit -m "Force-update base digest to $CURRENT_DIGEST (auto-resolved)"
fi
git push origin HEAD:main
echo "changed=true" >> $GITHUB_OUTPUT
- name: Detect changed vintage-story versions
id: check_changed_versions
run: |
BEFORE_COMMIT="${{ github.event.before }}"
if [ -z "$BEFORE_COMMIT" ] || ! git cat-file -e "$BEFORE_COMMIT^{commit}" 2>/dev/null; then
BEFORE_COMMIT=$(git rev-parse HEAD~1)
fi
CHANGED=$(git diff --name-only "$BEFORE_COMMIT" HEAD || true)
CHANGED_VERSIONS=""
for version in $VERSIONS; do
echo "$CHANGED" | grep -q "^$version/.*\.\(sh\|Dockerfile\)$" && CHANGED_VERSIONS="$CHANGED_VERSIONS $version"
done
CHANGED_VERSIONS=$(echo "$CHANGED_VERSIONS" | xargs) # trim whitespace
echo "versions_changed=$CHANGED_VERSIONS" >> $GITHUB_OUTPUT
- name: Detect vintage-story versions without build-info
id: check_new_versions
run: |
NEW_VERSIONS=""
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
git clone --depth=1 "https://${{ secrets.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/vintage-story.git" upload-repo
for version in $VERSIONS; do
if [ ! -f "upload-repo/$version/build-info.json" ]; then
echo "[INFO] No build-info.json for $version → treating as new"
NEW_VERSIONS="$NEW_VERSIONS $version"
fi
done
echo "new_versions=$NEW_VERSIONS" >> $GITHUB_OUTPUT
build-vintage-story-images:
runs-on: vm-docker-build2
needs:
- docker-prune
- poll-debian-base-and-detect-changes
if: |
needs.poll-debian-base-and-detect-changes.outputs.digest_changed == 'true' ||
needs.poll-debian-base-and-detect-changes.outputs.versions_changed != '' ||
needs.poll-debian-base-and-detect-changes.outputs.new_versions != ''
needs: docker-prune
strategy:
matrix:
version: [latest]
@@ -0,0 +1,309 @@
name: vintage-story-build-testing
on:
push:
branches:
- main
paths:
- '.gitea/workflows/vintage-story-build-testing.yml'
- 'testing/Dockerfile'
- 'testing/*.sh'
- '!.cache/*'
- '!testing/CHANGES.md'
- '!testing/build-info.json'
schedule:
- cron: '5 22 * * 0'
env:
IMAGE_REGISTRY: gitea.fithwum.tech
IMAGE_ORG: fithwum
IMAGE_REPO_DEBIAN: debian-base
IMAGE_REPO_VINTAGE_STORY: vintage-story
IMAGE_TAG_DEBIAN: bookworm
DIGEST_FILE: .cache/debian-base.digest
VERSIONS: testing
jobs:
docker-prune:
name: Docker prune (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- vm-docker-build2
steps:
- name: Prune unused Docker images
run: |
echo "[INFO] Pruning Docker images on ${{ matrix.runner }}..."
docker image prune -a -f || true
build-vintage-story-images:
runs-on: vm-docker-build2
needs: docker-prune
strategy:
matrix:
version: [testing]
name: Build and Push ${{ matrix.version }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Log in to Gitea Registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login gitea.fithwum.tech -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Clone vintage-story repo (with retries)
run: |
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
for i in {1..5}; do
git clone "https://${{ secrets.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/vintage-story.git" upload-repo && break
echo "[WARN] Clone attempt $i failed. Retrying in 10s..."
sleep 10
done
if [ ! -d upload-repo ]; then
echo "[ERROR] Failed to clone vintage-story repo after retries."
exit 1
fi
- name: Clear all build caches
run: |
docker builder prune -af || true
docker buildx prune -af || true
- name: Build and push image
run: |
IMAGE="$IMAGE_REGISTRY/$IMAGE_ORG/$IMAGE_REPO_VINTAGE_STORY:${{ matrix.version }}"
docker buildx build --platform linux/amd64 --pull --no-cache --push -t "$IMAGE" "./${{ matrix.version }}"
generate-changelogs:
needs: build-vintage-story-images
runs-on: vm-docker-build2
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Create temporary changelog workspace
run: mkdir -p changelogs
- name: Clone vintage-story repo
run: |
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
git clone --depth=3 "https://${{ secrets.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/vintage-story.git" upload-repo
- name: Generate changelogs
run: |
for version in $VERSIONS; do
echo "[INFO] Generating changelog for $version"
changelog="changelogs/$version/CHANGES.md"
mkdir -p "$(dirname "$changelog")"
touch "$changelog"
cd upload-repo
infofile="$version/build-info.json"
last_commit=""
if [ -f "$infofile" ]; then
last_commit=$(jq -r '.commit' "$infofile")
fi
echo -e "## $(date -u +'%Y-%m-%dT%H:%M:%SZ')\n" > "../$changelog"
if [ -n "$last_commit" ]; then
COMMITS=$(git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" || true)
fi
if [ -z "$COMMITS" ]; then
echo "[INFO] No new commits since last build. Showing latest 5 instead."
COMMITS=$(git log -n 5 --pretty=format:"- %s (%an)" || true)
fi
echo "$COMMITS" >> "../$changelog"
cd ..
done
- name: Copy changelogs into repo
run: |
for version in $VERSIONS; do
mkdir -p upload-repo/$version
cp changelogs/$version/CHANGES.md upload-repo/$version/
done
- name: Commit and push changelogs (temp branch)
run: |
cd upload-repo
git config user.name "${{ secrets.GIT_USERNAME }}"
git config user.email "${{ secrets.GIT_EMAIL }}"
TEMP_BRANCH="tmp-changelog-$(date +%s)"
# Create temporary branch
git checkout -b "$TEMP_BRANCH"
# Stage changes
git add */CHANGES.md
# Nothing changed?
if git diff --cached --quiet; then
echo "[INFO] No changelog changes."
exit 0
fi
git commit -m "Update changelogs on $(date -u +'%Y-%m-%dT%H:%M:%SZ') [skip ci]"
# Push temporary branch
git push origin HEAD:$TEMP_BRANCH
# Rebase temp branch onto latest main
git fetch origin main
git checkout "$TEMP_BRANCH"
if ! git rebase origin/main; then
echo "[WARN] Rebase failed, using merge instead."
git rebase --abort || true
git merge origin/main --no-edit
fi
git push origin HEAD:$TEMP_BRANCH --force
# Fast-forward main
git checkout main
git reset --hard origin/main
git merge --no-ff "$TEMP_BRANCH" \
-m "Merge changelog updates"
git push origin main
git push origin --delete "$TEMP_BRANCH" || true
generate-build-info:
needs: generate-changelogs
runs-on: vm-docker-build2
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Prepare temporary build-info workspace
run: mkdir -p buildinfo
- name: Clone vintage-story repo
run: |
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
git clone --depth=1 "https://${{ secrets.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/vintage-story.git" upload-repo
- name: Generate build-info files
run: |
human_size() {
local b=$1 d='' s=0 S=(B KB MB GB TB)
while ((b >= 1024 && s < ${#S[@]}-1)); do
d=$((b % 1024)); b=$((b / 1024)); s=$((s + 1))
done
printf "%s%s\n" "$b" "${S[$s]}"
}
for version in $VERSIONS; do
echo "[INFO] Generating build-info.json for $version"
image="${IMAGE_REGISTRY}/${IMAGE_ORG}/${IMAGE_REPO_VINTAGE_STORY}:$version"
infofile="buildinfo/$version/build-info.json"
mkdir -p "$(dirname "$infofile")"
if ! docker pull "$image"; then
echo "[WARN] Failed to pull $image — setting fields to unknown/0"
digest="unknown"
size_bytes=0
else
digest=$(docker inspect --format='{{if .RepoDigests}}{{index .RepoDigests 0}}{{else}}unknown{{end}}' "$image" 2>/dev/null || echo "unknown")
size_bytes=$(docker image inspect "$image" --format='{{.Size}}' 2>/dev/null || echo "0")
size_bytes=${size_bytes//[^0-9]/}
if [[ -z "$size_bytes" ]]; then size_bytes=0; fi
fi
size_human=$(human_size "$size_bytes")
cd upload-repo
commit=$(git rev-parse HEAD)
cd ..
jq -n \
--arg version "$version" \
--arg commit "$commit" \
--arg build_time "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--arg image_tag "$image" \
--arg digest "$digest" \
--arg image_size "$size_human" \
--argjson image_size_bytes "$size_bytes" \
'{
version: $version,
commit: $commit,
build_time: $build_time,
image_tag: $image_tag,
digest: $digest,
image_size: $image_size,
image_size_bytes: $image_size_bytes
}' > "$infofile"
done
- name: Copy build-info.json into repo
run: |
for version in $VERSIONS; do
mkdir -p upload-repo/$version
cp "buildinfo/$version/build-info.json" "upload-repo/$version/"
done
- name: Commit and push build-info (temp branch)
run: |
cd upload-repo
git config user.name "${{ secrets.GIT_USERNAME }}"
git config user.email "${{ secrets.GIT_EMAIL }}"
TEMP_BRANCH="tmp-buildinfo-$(date +%s)"
# Create temporary branch
git checkout -b "$TEMP_BRANCH"
# Stage changes
git add */build-info.json
# Nothing changed?
if git diff --cached --quiet; then
echo "[INFO] No build-info changes."
exit 0
fi
git commit -m "Update build-info on $(date -u +'%Y-%m-%dT%H:%M:%SZ') [skip ci]"
# Push temporary branch
git push origin HEAD:$TEMP_BRANCH
# Rebase temp branch onto latest main
git fetch origin main
git checkout "$TEMP_BRANCH"
if ! git rebase origin/main; then
echo "[WARN] Rebase failed, using merge instead."
git rebase --abort || true
git merge origin/main --no-edit
fi
git push origin HEAD:$TEMP_BRANCH --force
# Merge into main
git checkout main
git reset --hard origin/main
git merge --no-ff "$TEMP_BRANCH" \
-m "Merge build-info updates"
git push origin main
git push origin --delete "$TEMP_BRANCH" || true
for version in $VERSIONS; do
TAG="build-$version"
git tag -d "$TAG" 2>/dev/null || true
git push origin ":refs/tags/$TAG" 2>/dev/null || true
git tag "$TAG"
git push origin "$TAG" --force
done
-3
View File
@@ -1,8 +1,5 @@
# Vintage Story
[![vintage-story-build-server](https://gitea.fithwum.tech/fithwum/vintage-story/actions/workflows/vintage-story-build-server.yml/badge.svg?branch=main)](https://gitea.fithwum.tech/fithwum/vintage-story/actions?workflow=vintage-story-build-server.yml)
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+1
View File
@@ -3,4 +3,5 @@
# All rights reserved
docker build --pull --rm -f "latest/Dockerfile" -t gitea.fithwum.tech/fithwum/vintage-story:latest "latest"
docker build --pull --rm -f "testing/Dockerfile" -t gitea.fithwum.tech/fithwum/vintage-story:testing "testing"
docker push -a gitea.fithwum.tech/fithwum/vintage-story
+5 -3
View File
@@ -1,5 +1,7 @@
## 2026-07-28T18:27:15Z
## 2026-08-09T22:11:52Z
- test (fithwum)
- Merge build-info updates (fithwum)
- Update build-info on 2026-07-28T18:22:00Z [skip ci] (fithwum)
- Update build-info on 2026-08-09T22:06:54Z [skip ci] (fithwum)
- Merge changelog updates (fithwum)
- Update changelogs on 2026-08-09T22:06:43Z [skip ci] (fithwum)
- Merge build-info updates (fithwum)
-1
View File
@@ -4,7 +4,6 @@ LABEL maintainer="fithwum"
# Environment Variables
ENV VS_CHANNEL=""
ENV VS_VERSION=""
ENV USERNAME=""
ENV DOTNET_VERSION=""
# URL's for files
+4 -4
View File
@@ -1,9 +1,9 @@
{
"version": "latest",
"commit": "3d8511dc08e6e8fb95dd8260c97fc88b2e1d7980",
"build_time": "2026-07-28T18:27:27Z",
"commit": "7f3f010574ff84f850b0cca9598a0e49319bb5ea",
"build_time": "2026-08-09T22:12:03Z",
"image_tag": "gitea.fithwum.tech/fithwum/vintage-story:latest",
"digest": "gitea.fithwum.tech/fithwum/vintage-story@sha256:2e7cd3fb99b88787947e2dbdd8826ad31e98249f3a810b520dfcbbe77fe3697f",
"digest": "gitea.fithwum.tech/fithwum/vintage-story@sha256:21664ac16465bad37f3a9b6a6e00660ba0cac91f26fe1e323c1d7779fcbfc749",
"image_size": "410MB",
"image_size_bytes": 430944219
"image_size_bytes": 430959352
}
+71 -46
View File
@@ -2,13 +2,12 @@
# Copyright (c) 2026 fithwum
# All rights reserved
MARKER_FILE=$VS_SERVER_DIR/.setup_done
VS_SERVER_DIR=/vs_server/server
VS_DATA_DIR=/vs_server/server/data
START_FILE=$VS_SERVER_DIR/server-$VS_VERSION.sh
LOG_FILE=$VS_DATA_DIR/Logs/server-main.log
START_FILE_2=https://gitea.fithwum.tech/fithwum/vintage-story/raw/branch/main/latest/start.sh
VS_SERVER_FILE=https://cdn.vintagestory.at/gamefiles/$VS_CHANNEL/vs_server_linux-x64_$VS_VERSION.tar.gz
MARKER_FILE=$VS_SERVER_DIR/.setup_done
INSTALLED_VERSION=$VS_SERVER_DIR/installed-$TARGET_VERSION
START_FILE=$VS_SERVER_DIR/server.sh
MS_REPO_URL=https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb
USERNAME=adduser vintagestory
@@ -60,27 +59,64 @@ else
sleep infinity
fi
# Main install (Debian).
# Main install & auto update.
# Check for server files and download if needed.
if [ -e $START_FILE ]
then
# Fallback to stable channel if VS_CHANNEL is blank
: "${VS_CHANNEL:=stable}"
echo "Using channel: $VS_CHANNEL"
# Get the currently installed version from filesystem
CUR_V=$(find "$VS_SERVER_DIR" -name "installed-*" | cut -d - -f2-)
echo "Current local version: '${CUR_V:-None}'"
# Fetch the API JSON cleanly
API_URL="http://api.vintagestory.at/${VS_CHANNEL}.json"
JSON=$(wget -qO- "$API_URL")
# Validate that we actually received valid JSON
if [ -z "$JSON" ] || ! echo "$JSON" | jq . >/dev/null 2>&1; then
echo "Error: Failed to fetch valid JSON from $API_URL"
exit 1
fi
# Resolve the target version dynamically from the JSON Object keys
if [ ! -z "$VS_VERSION" ] && [ "$VS_VERSION" != "latest" ]; then
# User specified an exact version. Check if it exists as a key in the object
TARGET_VERSION=$(echo "$JSON" | jq -r --arg version "$VS_VERSION" 'if .[$version] then $version else "" end')
if [ -z "$TARGET_VERSION" ]; then
echo "Error: Specified version '$VS_VERSION' not found in the $VS_CHANNEL channel API."
exit 1
fi
else
# No version specified or "latest" chosen. Get the very first key from the object
TARGET_VERSION=$(echo "$JSON" | jq -r 'keys_unsorted | .[0]')
fi
echo "Target version determined: '$TARGET_VERSION'"
# Compare versions and only download if they do NOT match
if [ "$CUR_V" != "$TARGET_VERSION" ]; then
echo "Versions differ ($CUR_V vs $TARGET_VERSION). Fetching CDN download URL..."
# Extract the CDN download link using the valid object key structure
VS_SERVER_FILE=$(echo "$JSON" | jq -r --arg version "$TARGET_VERSION" '.[$version].linuxserver.urls.cdn')
if [ "$VS_SERVER_FILE" == "null" ] || [ -z "$VS_SERVER_FILE" ]; then
echo "Error: Download URL not found for version $TARGET_VERSION"
exit 1
fi
echo "Ready to download: $VS_SERVER_FILE"
echo " "
echo "INFO ! server-$VS_VERSION.sh found starting now."
else
echo " "
echo "WARNING ! server-$VS_VERSION.sh is out of date/missing ... will download now."
echo " "
echo "INFO ! Cleaning old files."
mkdir -pv $VS_SERVER_DIR/old-server-versions/
mv *.sh $VS_SERVER_DIR/old-server-versions/
rm -fr $VS_SERVER_DIR/assets $VS_SERVER_DIR/Lib $VS_SERVER_DIR/Mods
rm -fr $VS_SERVER_DIR/VintagestoryServer $VS_SERVER_DIR/*.dll $VS_SERVER_DIR/*.pdb $VS_SERVER_DIR/*.json $VS_SERVER_DIR/*.xml $VS_SERVER_DIR/*.txt
wget --no-cache --show-progress --progress=bar:force:noscroll $VS_SERVER_FILE -O /vstemp/vs_server_linux-x64_$VS_VERSION.tar.gz
tar -xzf /vstemp/vs_server_linux-x64_$VS_VERSION.tar.gz -C /vstemp/files
rm -fr /vstemp/*.tar.gz
mv -uf /vstemp/files/* $VS_SERVER_DIR/
mv $VS_SERVER_DIR/server.sh $START_FILE
chmod +x $START_FILE
echo "INFO ! Cleaning old files."
mkdir -pv $VS_SERVER_DIR/old-server-versions/
mv *.sh $VS_SERVER_DIR/old-server-versions/
rm -fr $VS_SERVER_DIR/assets $VS_SERVER_DIR/Lib $VS_SERVER_DIR/Mods
rm -fr $VS_SERVER_DIR/VintagestoryServer $VS_SERVER_DIR/*.dll $VS_SERVER_DIR/*.pdb $VS_SERVER_DIR/*.json $VS_SERVER_DIR/*.xml $VS_SERVER_DIR/*.txt
wget --no-cache --show-progress --progress=bar:force:noscroll $VS_SERVER_FILE -O /vstemp/vs_server_linux-x64_$TARGET_VERSION.tar.gz
tar -xzf /vstemp/vs_server_linux-x64_$TARGET_VERSION.tar.gz -C /vstemp/files
rm -fr /vstemp/*.tar.gz
mv -uf /vstemp/files/* $VS_SERVER_DIR/
chmod +x $START_FILE
touch $INSTALLED_VERSION
else
echo "No update required. Local version matches target version."
fi
echo "INFO ! Setting server path."
@@ -95,35 +131,24 @@ chmod 776 -R $VS_SERVER_DIR
# Setup the server
if [ ! -f $MARKER_FILE ]; then
echo "First time run: Setting up server environment..."
yes y | $VS_SERVER_DIR/server-1.21.5.sh setup $USERNAME $VS_DATA_DIR
yes y | $VS_SERVER_DIR/server.sh setup $USERNAME $VS_DATA_DIR
touch $MARKER_FILE
echo "Setup successfully completed."
fi
# Download the start file for the screen session
if [ -f $START_FILE_2 ]; then
echo "INFO ! start.sh found ... moving on."
else
echo "WARNING ! start.sh missing ... downloading default file."
wget --no-cache --show-progress --progress=bar:force:noscroll $START_FILE_2 -O $VS_SERVER_DIR/start.sh
chmod +x $VS_SERVER_DIR/start.sh
fi
# Run vintage-story server.
exec $VS_SERVER_DIR/start.sh
echo " "
echo "INFO ! Starting vintage-story Server $VS_VERSION"
.$START_FILE start
# echo " "
# echo "INFO ! Starting vintage-story Server $VS_VERSION"
# .$VS_SERVER_DIR/server-$VS_VERSION.sh start
echo "Waiting for the server log file to be created..."
# Loop indefinitely until the log file actually exists on disk
until [ -f "$LOG_FILE" ]; do
sleep 1
done
# echo "Waiting for the server log file to be created..."
# # Loop indefinitely until the log file actually exists on disk
# until [ -f "$LOG_FILE" ]; do
# sleep 1
# done
# echo "Log file found! Streaming server console now..."
# # Hand off PID 1 to tail, keeping the container active permanently
# exec tail -f "$LOG_FILE"
echo "Log file found! Streaming server console now..."
# Hand off PID 1 to tail, keeping the container active permanently
exec tail -f "$LOG_FILE"
exit
+7
View File
@@ -0,0 +1,7 @@
## 2026-08-16T22:06:45Z
- Merge build-info updates (fithwum)
- Update build-info on 2026-08-09T22:12:04Z [skip ci] (fithwum)
- Merge changelog updates (fithwum)
- Update changelogs on 2026-08-09T22:11:52Z [skip ci] (fithwum)
- Merge build-info updates (fithwum)
+32
View File
@@ -0,0 +1,32 @@
FROM gitea.fithwum.tech/fithwum/debian-base:bookworm
LABEL maintainer="fithwum"
# Environment Variables
ENV VS_CHANNEL=""
ENV VS_VERSION=""
ENV DOTNET_VERSION=""
# URL's for files
ARG INSTALL_SCRIPT=https://gitea.fithwum.tech/fithwum/vintage-story/raw/branch/main/testing/install_script.sh
# Install Dependencies.
RUN apt-get -y update && apt-get autoclean && apt-get autoremove \
&& apt-get -y update && apt-get install -y bzip2 jq wget procps pcregrep screen \
&& adduser vintagestory \
&& apt-get -y --fix-broken install \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates -f;
# Folder creation.
RUN mkdir -p /vs_server /vs_server/server /vs_server/server/data /vstemp /vstemp/files \
&& chmod 777 -R /vs_server /vstemp \
&& chown 99:100 -R /vs_server /vstemp
RUN wget --no-cache "$INSTALL_SCRIPT" -O /vstemp/install_script.sh \
&& chmod +x /vstemp/install_script.sh
# Directory where data is stored
VOLUME /vs_server
# Run command
CMD [ "/bin/bash", "./vstemp/install_script.sh" ]
+9
View File
@@ -0,0 +1,9 @@
{
"version": "testing",
"commit": "189cd8106b17821d0e2ccd240af3c85e54d9c645",
"build_time": "2026-08-16T22:06:56Z",
"image_tag": "gitea.fithwum.tech/fithwum/vintage-story:testing",
"digest": "gitea.fithwum.tech/fithwum/vintage-story@sha256:cdf8ab5f469ff4d05d8431d65a7bad59229b7686e7c69b8eb5d623fcf0c9b2e4",
"image_size": "410MB",
"image_size_bytes": 430946035
}
+166
View File
@@ -0,0 +1,166 @@
#!/bin/bash
# Copyright (c) 2026 fithwum
# All rights reserved
VS_SERVER_DIR=/vs_server/server
VS_DATA_DIR=/vs_server/server/data
LOG_FILE=$VS_DATA_DIR/Logs/server-main.log
MARKER_FILE=$VS_SERVER_DIR/.setup_done
INSTALLED_VERSION=$VS_SERVER_DIR/installed-$TARGET_VERSION
START_FILE_1=$VS_SERVER_DIR/server.sh
START_FILE_2=https://gitea.fithwum.tech/fithwum/vintage-story/raw/branch/main/testing/start.sh
MS_REPO_URL=https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb
USERNAME=adduser vintagestory
# DOTnet install
if [ $DOTNET_VERSION = "8.0" ]; then
echo "INFO ! dotnet-sdk-$DOTNET_VERSION Selected"
if [ dpkg -s dotnet-sdk-8.0 &> /dev/null ]
then
echo "INFO ! dotnet-sdk-8.0 installed ... moving on."
else
echo " "
echo "WARNING ! dotnet-sdk-8.0 not installed ... will install now."
wget --no-cache --show-progress --progress=bar:force:noscroll $MS_REPO_URL -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get -y update
apt-get install -y dotnet-sdk-8.0
fi
elif [ $DOTNET_VERSION = "9.0" ]; then
echo "INFO ! dotnet-sdk-$DOTNET_VERSION Selected"
if [ dpkg -s dotnet-sdk-9.0 &> /dev/null ]
then
echo "INFO ! dotnet-sdk-9.0 installed ... moving on."
else
echo " "
echo "WARNING ! dotnet-sdk-9.0 not installed ... will install now."
wget --no-cache --show-progress --progress=bar:force:noscroll $MS_REPO_URL -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get -y update
apt-get install -y dotnet-sdk-9.0
fi
elif [ $DOTNET_VERSION = "10.0" ]; then
echo "INFO ! dotnet-sdk-$DOTNET_VERSION Selected"
if [ dpkg -s dotnet-sdk-10.0 &> /dev/null ]
then
echo "INFO ! dotnet-sdk-10.0 installed ... moving on."
else
echo " "
echo "WARNING ! dotnet-sdk-10.0 not installed ... will install now."
wget --no-cache --show-progress --progress=bar:force:noscroll $MS_REPO_URL -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get -y update
apt-get install -y dotnet-sdk-10.0
fi
else
echo "ERROR ! Dotnet version must be set first run"
sleep infinity
fi
# Main install & auto update.
# Check for server files and download if needed.
# Fallback to stable channel if VS_CHANNEL is blank
: "${VS_CHANNEL:=stable}"
echo "Using channel: $VS_CHANNEL"
# Get the currently installed version from filesystem
CUR_V=$(find "$VS_SERVER_DIR" -name "installed-*" | cut -d - -f2-)
echo "Current local version: '${CUR_V:-None}'"
# Fetch the API JSON cleanly
API_URL="http://api.vintagestory.at/$VS_CHANNEL.json"
JSON=$(wget -qO- "$API_URL")
# Validate that we actually received valid JSON
if [ -z "$JSON" ] || ! echo "$JSON" | jq . >/dev/null 2>&1; then
echo "Error: Failed to fetch valid JSON from $API_URL"
exit 1
fi
# Resolve the target version dynamically from the JSON Object keys
if [ ! -z "$VS_VERSION" ] && [ "$VS_VERSION" != "latest" ]; then
# User specified an exact version. Check if it exists as a key in the object
TARGET_VERSION=$(echo "$JSON" | jq -r --arg version "$VS_VERSION" 'if .[$version] then $version else "" end')
if [ -z "$TARGET_VERSION" ]; then
echo "Error: Specified version '$VS_VERSION' not found in the $VS_CHANNEL channel API."
exit 1
fi
else
# No version specified or "latest" chosen. Get the very first key from the object
TARGET_VERSION=$(echo "$JSON" | jq -r 'keys_unsorted | .[0]')
fi
echo "Target version determined: '$TARGET_VERSION'"
# Compare versions and only download if they do NOT match
if [ "$CUR_V" != "$TARGET_VERSION" ]; then
echo "Versions differ ($CUR_V vs $TARGET_VERSION). Fetching CDN download URL..."
# Extract the CDN download link using the valid object key structure
VS_SERVER_FILE=$(echo "$JSON" | jq -r --arg version "$TARGET_VERSION" '.[$version].linuxserver.urls.cdn')
if [ "$VS_SERVER_FILE" == "null" ] || [ -z "$VS_SERVER_FILE" ]; then
echo "Error: Download URL not found for version $TARGET_VERSION"
exit 1
fi
echo "Ready to download: $VS_SERVER_FILE"
echo " "
echo "INFO ! Cleaning old files."
mkdir -pv $VS_SERVER_DIR/old-server-versions/
mv $VS_SERVER_DIR/*.sh $VS_SERVER_DIR/old-server-versions/
rm -fr $VS_SERVER_DIR/assets $VS_SERVER_DIR/Lib $VS_SERVER_DIR/Mods
rm -fr $VS_SERVER_DIR/VintagestoryServer $VS_SERVER_DIR/*.dll $VS_SERVER_DIR/*.pdb $VS_SERVER_DIR/*.json $VS_SERVER_DIR/*.xml $VS_SERVER_DIR/*.txt $VS_SERVER_DIR/installed-*
wget --no-cache --show-progress --progress=bar:force:noscroll $VS_SERVER_FILE -O /vstemp/vs_server_linux-x64_$TARGET_VERSION.tar.gz
tar -xzf /vstemp/vs_server_linux-x64_$TARGET_VERSION.tar.gz -C /vstemp/files
rm -fr /vstemp/*.tar.gz
mv -uf /vstemp/files/* $VS_SERVER_DIR/
chmod +x $START_FILE_1
touch $INSTALLED_VERSION
else
echo "No update required. Local version matches target version."
fi
echo "INFO ! Setting server path."
sed -i -E "s|^VSPATH='/home/vintagestory/server'|VSPATH='$VS_SERVER_DIR'|" $START_FILE_1
echo "INFO ! Setting data path."
sed -i -E "s|^DATAPATH='/var/vintagestory/data'|DATAPATH='$VS_DATA_DIR'|" $START_FILE_1
# Set permissions.
chown 99:100 -R $VS_SERVER_DIR
chmod 776 -R $VS_SERVER_DIR
# Setup the server
if [ ! -f $MARKER_FILE ]; then
echo "First time run: Setting up server environment..."
yes y | $VS_SERVER_DIR/server.sh setup $USERNAME $VS_DATA_DIR
touch $MARKER_FILE
echo "Setup successfully completed."
fi
# Download the start file for the screen session
if [ -f $START_FILE_2 ]; then
echo "INFO ! start.sh found ... moving on."
else
echo "WARNING ! start.sh missing ... downloading default file."
wget --no-cache --show-progress --progress=bar:force:noscroll $START_FILE_2 -O $VS_SERVER_DIR/start.sh
chmod +x $VS_SERVER_DIR/start.sh
fi
# Run vintage-story server.
exec $VS_SERVER_DIR/start.sh
# echo " "
# echo "INFO ! Starting vintage-story Server $VS_VERSION"
# .$START_FILE_1 start
# echo "Waiting for the server log file to be created..."
# # Loop indefinitely until the log file actually exists on disk
# until [ -f "$LOG_FILE" ]; do
# sleep 1
# done
# echo "Log file found! Streaming server console now..."
# # Hand off PID 1 to tail, keeping the container active permanently
# exec tail -f "$LOG_FILE"
exit
-2
View File
@@ -5,8 +5,6 @@
LOG_FILE=/vs_server/server/data/Logs/server-main.log
SESSION=server
# cd /vs_server/server
echo "INFO ! A screen session for the Vintage-Story server is already running."
cleanup() {
echo "[INFO] Stopping Vintage-Story ..."