Skip to content

Commit

Permalink
[TO DROP] CI: Fix flatpak-builder-lint action
Browse files Browse the repository at this point in the history
- Fix for loops syntax
- Manage jq empty output
  • Loading branch information
tytan652 committed Jul 9, 2024
1 parent 21ac188 commit 3985104
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/actions/flatpak-builder-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ runs:
exit $exit_code
fi
for ((i = 0 ; i < $(echo $ret | jq '.warnings | length') ; i++)); do
n_warnings=$(echo $ret | jq '.warnings | length')
for ((i = 0 ; i < n_warnings ; i++)); do
warning=$(echo $ret | jq ".warnings[$i]")
echo "::warning::$warning found in the Flatpak ${{ inputs.artifact }}"
done
n_errors=$(echo $ret | jq '.errors | length')
for ((i = 0 ; i < $n_errors ; i++)); do
for ((i = 0 ; i < n_errors ; i++)); do
error=$(echo $ret | jq ".errors[$i]")
echo "::error::$error found in the Flatpak ${{ inputs.artifact }}"
done
[[ $n_errors == 0 ]] || exit 2
[[ -z $n_errors || $n_errors == 0 ]] || exit 2

0 comments on commit 3985104

Please sign in to comment.