diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 827d0912..9c9f4f29 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -44,6 +44,10 @@ jobs: - name: Generate cooker build ID run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/cooker_build_id.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" @@ -66,8 +70,9 @@ 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..." + rm -f "{GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml" + cp "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak" "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml" ls -lah "/bin/bash ${GITHUB_WORKSPACE}" # DEBUG ls -lah "/bin/bash ${GITHUB_WORKSPACE}/automation_tools" # DEBUG "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"