mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: print errors in weblate merge job (#21683)
This commit is contained in:
parent
c0bff4b493
commit
6a55c36762
1 changed files with 9 additions and 2 deletions
11
.github/workflows/merge-translations.yml
vendored
11
.github/workflows/merge-translations.yml
vendored
|
|
@ -21,16 +21,23 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
gh pr list --repo $GITHUB_REPOSITORY --author weblate --json number,mergeable | read PR
|
gh pr list --repo $GITHUB_REPOSITORY --author weblate --json number,mergeable | read PR
|
||||||
|
echo "$PR"
|
||||||
|
|
||||||
echo "$PR" | jq '
|
echo "$PR" | jq '
|
||||||
if length == 1 then
|
if length == 1 then
|
||||||
.[0].number
|
.[0].number
|
||||||
else
|
else
|
||||||
error("Expected exactly 1 entry, got \(length)")
|
error("Expected exactly 1 entry, got \(length)")
|
||||||
end
|
end
|
||||||
' | read PR_NUMBER
|
' 2>&1 | read PR_NUMBER || exit 1
|
||||||
|
|
||||||
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
|
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
|
- name: Generate a token
|
||||||
id: generate_token
|
id: generate_token
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue