Update .gitea/workflows/pipeline.yml
All checks were successful
Build and Push Minecraft Docker Images on Debian-base update / poll-debian-base-and-detect-changes (push) Successful in 19s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-fabric (push) Successful in 1m51s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push fabric (push) Successful in 1m51s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-vanilla (push) Successful in 1m56s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 1m16s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Successful in 6s
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Successful in 51s
All checks were successful
Build and Push Minecraft Docker Images on Debian-base update / poll-debian-base-and-detect-changes (push) Successful in 19s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-fabric (push) Successful in 1m51s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push fabric (push) Successful in 1m51s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push testing-vanilla (push) Successful in 1m56s
Build and Push Minecraft Docker Images on Debian-base update / Build and Push vanilla (push) Successful in 1m16s
Build and Push Minecraft Docker Images on Debian-base update / generate-changelogs (push) Successful in 6s
Build and Push Minecraft Docker Images on Debian-base update / generate-build-info (push) Successful in 51s
This commit is contained in:
@@ -56,23 +56,59 @@ jobs:
|
||||
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
|
||||
else
|
||||
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
|
||||
# Try to rebase onto latest remote
|
||||
git pull --rebase || {
|
||||
echo "[ERROR] Rebase failed — aborting."
|
||||
exit 1
|
||||
}
|
||||
git push
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
|
||||
# --- Safe rebase with auto conflict resolution ---
|
||||
git fetch origin master
|
||||
if ! git rebase --strategy-option=theirs origin/master; then
|
||||
echo "[WARN] Rebase conflict, auto-resolving by preferring local digest"
|
||||
git rebase --abort
|
||||
git fetch origin master
|
||||
git reset --hard origin/master
|
||||
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:master
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
|
||||
# - 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 "changed=false" >> $GITHUB_OUTPUT
|
||||
# else
|
||||
# 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
|
||||
# # Try to rebase onto latest remote
|
||||
# git pull --rebase || {
|
||||
# echo "[ERROR] Rebase failed — aborting."
|
||||
# exit 1
|
||||
# }
|
||||
# git push
|
||||
# echo "changed=true" >> $GITHUB_OUTPUT
|
||||
# fi
|
||||
|
||||
- name: Detect changed Minecraft versions
|
||||
id: check_changed_versions
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user