diff --git a/.gitea/workflows/android-build.yml b/.gitea/workflows/android-build.yml index 9b47e24..39b9c47 100644 --- a/.gitea/workflows/android-build.yml +++ b/.gitea/workflows/android-build.yml @@ -158,11 +158,13 @@ jobs: API="https://git.sal.giize.com/api/v1/repos/mozempk/scopone" # ── Changelog: commits since last build-* tag (or last 30 commits) ── - LAST_TAG=$(git tag --sort=-creatordate | grep -E '^build-[0-9]+$' | head -1 || true) + # Use grep -m1 instead of | head -1 to avoid SIGPIPE under pipefail. + # Use git log -30 flag instead of | head -30 for the same reason. + LAST_TAG=$(git tag --sort=-creatordate | grep -Em1 '^build-[0-9]+$' || true) if [[ -n "$LAST_TAG" ]]; then - COMMIT_LOG=$(git log --oneline "${LAST_TAG}..HEAD" 2>/dev/null || git log --oneline | head -30) + COMMIT_LOG=$(git log --oneline -30 "${LAST_TAG}..HEAD" 2>/dev/null || git log --oneline -30) else - COMMIT_LOG=$(git log --oneline | head -30) + COMMIT_LOG=$(git log --oneline -30) fi # Format as a markdown list and JSON-encode for the API body. MD_LIST=$(echo "$COMMIT_LOG" | sed 's/^/- /')