From 6c5a9175d14a896ba99092ccd58427f89541339a Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 20 Dec 2023 08:53:54 +0100 Subject: [PATCH] PIPELINE: fixed download retry with manifest backup --- .github/workflows/main-selfhosted.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index 0cb68026..b30cb9aa 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -40,6 +40,10 @@ jobs: - name: "Install dependencies" run: "automation_tools/install_dependencies.sh" + # backing up manifest in case download fails and hashes must be recalculated + - name: Manifest backup + run: "cp ${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml ${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak" + - name: Run pre-build automation tasks run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" @@ -71,10 +75,11 @@ jobs: if: steps.flatpak-download.outcome == 'failure' run: | echo "Download failed, maybe some hash changed since the build start." - git checkout -- net.retrodeck.retrodeck.yml echo "Recalculating hashes and retrying download..." - "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" - "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh" + rm -f "{GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml" + cp "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak" "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml" + "${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" + "${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh" - name: Build flatpak run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"