From f1c33cfdadb4298f40e709e23ed0609f93b36058 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 17 Dec 2023 00:00:35 +0100 Subject: [PATCH] TEST: backupping and restoring manifest in case of hashes failure --- .github/workflows/cooker-selfhosted.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"