CI: Add appstream type support to flatpak-builder-lint action

This commit is contained in:
tytan652
2024-02-23 10:35:40 +01:00
committed by Georges Basile Stavracas Neto
parent ba4f17e114
commit 63eef36786

View File

@@ -2,7 +2,7 @@ name: Run flatpak-builder-lint
description: Runs flatpak-builder-lint with exceptions
inputs:
artifact:
description: Type of artifact to lint (builddir, repo, manifest)
description: Type of artifact to lint (builddir, repo, manifest, appstream)
required: true
path:
description: Path to flatpak-builder manifest or Flatpak build directory
@@ -23,6 +23,7 @@ runs:
builddir);;
repo);;
manifest);;
appstream);;
*)
echo "::error::Given artifact type is incorrect"
exit 2
@@ -42,6 +43,14 @@ runs:
exit 2
fi
if [[ ${{ inputs.artifact }} == "appstream" ]]; then
echo $ret
[[ $exit_code != 0 ]] && echo "::error::Flatpak appstream info is not valid"
exit $exit_code
fi
for ((i = 0 ; i < $(echo $ret | jq '.warnings | length') ; i++)); do
warning=$(echo $ret | jq ".warnings[$i]")
echo "::warning::$warning found in the Flatpak ${{ inputs.artifact }}"