From 5e762cc056420fdff86c25286b0f13ee917c05f6 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Wed, 30 Aug 2023 12:03:03 -0400 Subject: [PATCH] Sync to main repo --- .github/workflows/cooker-selfhosted.yml | 34 ++++++++++++++++++++++++- .github/workflows/main-selfhosted.yml | 29 +++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 7042d3f0..12062858 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -32,7 +32,10 @@ jobs: run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/* continue-on-error: true - - uses: actions/checkout@v3 + - name: Clone RetroDECK repo + uses: actions/checkout@v3 + with: + submodules: 'true' - name: Generate cooker build ID run: | @@ -59,6 +62,35 @@ jobs: sed -i "s/THISBRANCH/$(git rev-parse --abbrev-ref HEAD)/g" net.retrodeck.retrodeck.yml echo "Branch name is: $(git rev-parse --abbrev-ref HEAD)" + - name: "Build flatpak: download only" + id: "flatpak-download" + run: | + git config --global protocol.file.allow always + mkdir -vp ${GITHUB_WORKSPACE}/local + mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker + flatpak-builder --user --force-clean \ + --install-deps-from=flathub \ + --install-deps-from=flathub-beta \ + --repo=${GITHUB_WORKSPACE}/local \ + --download-only \ + ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \ + net.retrodeck.retrodeck.yml + + # Sometimes flatpak download fails, in this case it tries a second time + - name: "Build flatpak: download only (retry)" + if: steps.flatpak-download.outcome == 'failure' + run: | + git config --global protocol.file.allow always + mkdir -vp ${GITHUB_WORKSPACE}/local + mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker + flatpak-builder --user --force-clean \ + --install-deps-from=flathub \ + --install-deps-from=flathub-beta \ + --repo=${GITHUB_WORKSPACE}/local \ + --download-only \ + ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \ + net.retrodeck.retrodeck.yml + - name: Build flatpak run: | git config --global protocol.file.allow always diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index 8b3764f5..bf2fa44e 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -65,6 +65,35 @@ jobs: exit 1 fi + - name: "Build flatpak: download only" + id: "flatpak-download" + run: | + git config --global protocol.file.allow always + mkdir -vp ${GITHUB_WORKSPACE}/local + mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker + flatpak-builder --user --force-clean \ + --install-deps-from=flathub \ + --install-deps-from=flathub-beta \ + --repo=${GITHUB_WORKSPACE}/local \ + --download-only \ + ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \ + net.retrodeck.retrodeck.yml + + # Sometimes flatpak download fails, in this case it tries a second time + - name: "Build flatpak: download only (retry)" + if: steps.flatpak-download.outcome == 'failure' + run: | + git config --global protocol.file.allow always + mkdir -vp ${GITHUB_WORKSPACE}/local + mkdir -vp ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker + flatpak-builder --user --force-clean \ + --install-deps-from=flathub \ + --install-deps-from=flathub-beta \ + --repo=${GITHUB_WORKSPACE}/local \ + --download-only \ + ${GITHUB_WORKSPACE}/retrodeck-flatpak-cooker \ + net.retrodeck.retrodeck.yml + - name: Build flatpak run: | git config --global protocol.file.allow always