From 63eef36786a0efb0c3532ebd1f63996b8d3dab3f Mon Sep 17 00:00:00 2001 From: tytan652 Date: Fri, 23 Feb 2024 10:35:40 +0100 Subject: [PATCH] CI: Add appstream type support to flatpak-builder-lint action --- .github/actions/flatpak-builder-lint/action.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/flatpak-builder-lint/action.yaml b/.github/actions/flatpak-builder-lint/action.yaml index f53863599..2defa0124 100644 --- a/.github/actions/flatpak-builder-lint/action.yaml +++ b/.github/actions/flatpak-builder-lint/action.yaml @@ -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 }}"