How can I verify restored data integrity when using GitHub Actions artifact backup and restore?
0 reputation · 13 Feb 2024, 12:42 UTC
I need to confirm that data recovered from a GitHub Actions artifact exactly matches the original backup before using it in subsequent jobs. The workflow uses actions/upload-artifact@v3 to store a build output and actions/download-artifact@v3 to retrieve it in a later run, all on an ubuntu-latest runner with the artifact retained for the default 90‑day period. No external validation tools are installed, and the process must be reproducible across different workflow runs.
What is the recommended way to compute and compare checksums (e.g., SHA‑256) of the original and restored files within the same workflow? How can I detect possible corruption that might occur during artifact storage or download? Are there any built‑in GitHub Actions mechanisms or official recommendations for automatically validating artifact integrity after restoration?