This commit is contained in:
2025-07-10 06:36:39 -07:00
parent 5e7e79c915
commit 4eb9195975

View File

@@ -115,8 +115,9 @@ jobs:
IMAGE="$IMAGE_REGISTRY/$IMAGE_ORG/$IMAGE_REPO_MINECRAFT:${{ matrix.version }}"
docker buildx build --platform linux/amd64 --push -t "$IMAGE" "./${{ matrix.version }}"
generate-changelogs:
needs: build-minecraft-images
generate-changelogs:
needs: 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 != ''
runs-on: doc-docker-build2
strategy:
matrix:
@@ -139,7 +140,7 @@ jobs:
exit 1
fi
- name: Update changelog
- name: Generate changelog
run: |
cd upload-repo
changelog="${{ matrix.version }}/CHANGES.md"
@@ -153,12 +154,26 @@ jobs:
fi
echo -e "## $(date -u +'%Y-%m-%dT%H:%M:%SZ')\n" >> "$changelog"
if [ -n "$last_commit" ]; then
git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" | head -n 10 >> "$changelog"
else
git log -n 10 --pretty=format:"- %s (%an)" >> "$changelog"
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"
- name: Show git status (debug)
run: |
cd upload-repo
echo "[DEBUG] Git status before commit:"
git status
echo "[DEBUG] Git diff:"
git diff
- name: Commit and push changelog
run: |
cd upload-repo