fghfdghfdgh
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-rootfs-archives (push) Has been cancelled
Some checks failed
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-docker-images (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-changelogs (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / generate-build-info (push) Has been cancelled
Build, Upload RootFS, and Push Docker Images, update changelog, update build info. / build-and-push-rootfs-archives (push) Has been cancelled
This commit is contained in:
@@ -190,7 +190,7 @@ jobs:
|
||||
- name: Clone upload repo
|
||||
run: |
|
||||
GIT_CREDENTIAL="${{ secrets.GIT_TOKEN || secrets.GIT_PASSWORD }}"
|
||||
git clone --depth=50 "https://${{ env.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/debian-base.git" upload-repo
|
||||
git clone --depth=10 "https://${{ env.GIT_USERNAME }}:${GIT_CREDENTIAL}@gitea.fithwum.tech/fithwum/debian-base.git" upload-repo
|
||||
|
||||
- name: Generate per-version changelogs
|
||||
run: |
|
||||
@@ -210,11 +210,19 @@ jobs:
|
||||
|
||||
echo -e "\n## $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$changelog"
|
||||
|
||||
if [ -n "$last_commit" ] && git rev-parse --quiet --verify "$last_commit^{commit}" >/dev/null; then
|
||||
git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" | head -n 10 || true
|
||||
if [ -n "$last_commit" ]; then
|
||||
# Check if commit exists in history
|
||||
if git merge-base --is-ancestor "$last_commit" HEAD 2>/dev/null; then
|
||||
echo "[INFO] Using commits since $last_commit"
|
||||
git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" | head -n 10 >> "$changelog"
|
||||
else
|
||||
echo "[WARN] $last_commit not found in current history (likely due to shallow clone)"
|
||||
git log -n 10 --pretty=format:"- %s (%an)" >> "$changelog"
|
||||
fi
|
||||
else
|
||||
git log -n 10 --pretty=format:"- %s (%an)" || true
|
||||
fi >> "$changelog"
|
||||
echo "[INFO] No previous commit found in build-info.json"
|
||||
git log -n 10 --pretty=format:"- %s (%an)" >> "$changelog"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Commit and push changelogs if changed
|
||||
|
||||
Reference in New Issue
Block a user