diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index c0523f47..2618d7ba 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" @@ -67,10 +71,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"