fix: use checked-out commit in Gitea CD
CI / metadata (push) Successful in 53s
CI / formatting (push) Successful in 53s
CI / lint (push) Successful in 1m6s
CI / tests (push) Successful in 1m59s

This commit is contained in:
fraujulian committed 2026-10-02 15:19:05 +02:00
1 parent 0ae27adf90
commit d07db3d3cd
2 files changed
+7 -6

No files matched your search

+2 -2
View File
@@ -28,13 +28,13 @@ jobs:
--header "Authorization: token ${GITEA_TOKEN}" \
"${API_URL}?branch=main&limit=50")"
previous_sha="$(printf '%s' "$runs" | jq -r \
--argjson current_run "$GITEA_RUN_ID" \
--argjson current_run "$GITHUB_RUN_ID" \
'[.workflow_runs[] | select(.id != $current_run and .status == "success" and (.event == "schedule" or .event == "workflow_dispatch"))][0].head_sha // empty')"
if [ -z "$previous_sha" ]; then
echo 'changed=true' >> "$GITHUB_OUTPUT"
else
git cat-file -e "${previous_sha}^{commit}"
if git diff --quiet "$previous_sha" "$GITEA_SHA"; then
if git diff --quiet "$previous_sha" HEAD; then
echo 'changed=false' >> "$GITHUB_OUTPUT"
echo 'No changes since the previous successful development release.'
else