Skip to content

Commit

Permalink
[GitHub Actions] Flatpak: Check staged screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Dec 9, 2023
1 parent f80afac commit 6a93bc3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
15 changes: 14 additions & 1 deletion .ci/flatpak/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ test -f "${WZ_FLATPAK_BUILD_PATH}/app-info/icons/flatpak/128x128/${WZ_FLATPAK_AP
test -f "${WZ_FLATPAK_BUILD_PATH}/app-info/xmls/${WZ_FLATPAK_APPID}.xml.gz" || { echo "Missing ${WZ_FLATPAK_APPID}.xml.gz in app-info" ; exit 1; }
echo "::endgroup::"

echo "::group::Check screenshots"
if [ ! -d "${WZ_FLATPAK_BUILD_DIR}/screenshots" ]; then
echo "::notice ::Screenshots not mirrored by flatpak-builder?"
else
echo "Found screenshots:"
find "${WZ_FLATPAK_BUILD_DIR}/screenshots" -type f
fi
echo "::endgroup::"

echo "::group::Commit screenshots to the OSTree repository"
ostree commit --repo=${WZ_FLATPAK_LOCAL_REPO_NAME} --canonical-permissions --branch=screenshots/${WZ_FLATPAK_TARGET_ARCH} "${WZ_FLATPAK_BUILD_DIR}/screenshots"
if [ -d "${WZ_FLATPAK_BUILD_DIR}/screenshots" ]; then
ostree commit --repo=${WZ_FLATPAK_LOCAL_REPO_NAME} --canonical-permissions --branch=screenshots/${WZ_FLATPAK_TARGET_ARCH} "${WZ_FLATPAK_BUILD_DIR}/screenshots"
else
echo "::warning ::Screenshots not added to OSTree repository"
fi
echo "::endgroup::"
10 changes: 5 additions & 5 deletions .github/workflows/CI_flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ jobs:
. src/.ci/flatpak/build.sh
echo "WZ_FLATPAK_LOCAL_REPO_NAME=${WZ_FLATPAK_LOCAL_REPO_NAME}"
echo "WZ_FLATPAK_LOCAL_REPO_NAME=${WZ_FLATPAK_LOCAL_REPO_NAME}" >> $GITHUB_OUTPUT
- name: Output generated files listing
shell: bash
working-directory: flatpak_app/files
run: |
find . -type f
- name: Lint Flatpak
continue-on-error: true
env:
Expand All @@ -245,11 +250,6 @@ jobs:
with:
name: 'warzone2100_linux_flatpak_${{ matrix.arch }}'
path: ${{ steps.settings.outputs.WZ_FLATPAK_BUNDLE }}
- name: Output generated files listing
shell: bash
working-directory: flatpak_app/files
run: |
find . -type f
- name: Upload debug info
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 6a93bc3

Please sign in to comment.