TEST: backupping and restoring manifest in case of hashes failure

This commit is contained in:
XargonWan 2023-12-17 00:00:35 +01:00
parent 545b43ae9e
commit f1c33cfdad

View file

@ -44,6 +44,10 @@ jobs:
- name: Generate cooker build ID - name: Generate cooker build ID
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/cooker_build_id.sh" 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 - name: Run pre-build automation tasks
run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
@ -66,8 +70,9 @@ jobs:
if: steps.flatpak-download.outcome == 'failure' if: steps.flatpak-download.outcome == 'failure'
run: | run: |
echo "Download failed, maybe some hash changed since the build start." echo "Download failed, maybe some hash changed since the build start."
git checkout -- net.retrodeck.retrodeck.yml
echo "Recalculating hashes and retrying download..." 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}" # DEBUG
ls -lah "/bin/bash ${GITHUB_WORKSPACE}/automation_tools" # DEBUG ls -lah "/bin/bash ${GITHUB_WORKSPACE}/automation_tools" # DEBUG
"/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"