Skip to content

High performance self-hosted photo and video management solution.

fix: print errors in weblate merge job (#21683)

bo0tzz6a55c36762b0
diff --git a/.github/workflows/merge-translations.yml b/.github/workflows/merge-translations.yml
index 89a20290a9..c4167efa8a 100644
--- a/.github/workflows/merge-translations.yml
+++ b/.github/workflows/merge-translations.yml
@@ -21,16 +21,23 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
+ set -euo pipefail
+
gh pr list --repo $GITHUB_REPOSITORY --author weblate --json number,mergeable | read PR
+ echo "$PR"
+
echo "$PR" | jq '
if length == 1 then
.[0].number
else
error("Expected exactly 1 entry, got \(length)")
end
- ' | read PR_NUMBER
+ ' 2>&1 | read PR_NUMBER || exit 1
+
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
- echo "$PR" | jq -e '.[0].mergeable == "MERGEABLE"' || (echo "PR is not mergeable" && exit 1)
+ echo "Selected PR $PR_NUMBER"
+
+ echo "$PR" | jq -e '.[0].mergeable == "MERGEABLE"' || { echo "PR is not mergeable" ; exit 1 }
- name: Generate a token
id: generate_token