fix(maintenance): backup job fails every Sunday — tar archives its own output#230
Merged
Merged
Conversation
…rror Agent-Logs-Url: https://github.com/DavidKRK/DavidKRK.github.io/sessions/fa04d2c8-af20-4793-b289-949734e5fb4f Co-authored-by: DavidKRK <136035295+DavidKRK@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
DavidKRK
May 10, 2026 19:28
View session
|
|
✅ Deploy Preview for whimsical-kitsune-85066d ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for spiffy-liger-8bab58 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the weekly maintenance backup workflow failure caused by tar writing its output archive into the same directory tree it is archiving (triggering file changed as we read it), by generating the archive outside the source directory and then moving it into place for the release step.
Changes:
- Generate the backup archive in
/tmpinstead of the repository workspace to prevent self-archiving. - Move the completed archive back into the workspace so the existing GitHub Release upload step continues to work unchanged.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The weekly backup job (
cron: '0 1 * * 0') always exits 1 becausetarwrites the archive into.(the source directory it is reading), triggeringtar: .: file changed as we read it. The--exclude='*.tar.gz'guard is ineffective — the file already exists in the directory tree before tar can exclude it.Fix
Write the archive to
/tmpfirst, then move it into the workspace after tar completes:The subsequent
softprops/action-gh-releasestep is unchanged — it still picks up the archive by filename from the working directory.