Skip to content

Commit ea2da9c

Browse files
CopilotDavidKRK
andauthored
fix(maintenance): write tar archive to /tmp to avoid self-inclusion error (#230)
Agent-Logs-Url: https://github.com/DavidKRK/DavidKRK.github.io/sessions/fa04d2c8-af20-4793-b289-949734e5fb4f Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DavidKRK <136035295+DavidKRK@users.noreply.github.com>
1 parent 21a8615 commit ea2da9c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/maintenance.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,16 @@ jobs:
126126
DATE=$(date +%Y-%m-%d)
127127
ARCHIVE_NAME="davidkrk-backup-${DATE}.tar.gz"
128128
129-
# Créer l'archive en excluant les dossiers inutiles
130-
tar -czf "$ARCHIVE_NAME" \
129+
# Créer l'archive dans /tmp pour éviter que tar n'archive son propre fichier de sortie
130+
tar -czf "/tmp/$ARCHIVE_NAME" \
131131
--exclude='.git' \
132132
--exclude='node_modules' \
133133
--exclude='dist' \
134-
--exclude='*.tar.gz' \
135134
.
136135
136+
# Déplacer l'archive vers le répertoire courant pour l'étape de release
137+
mv "/tmp/$ARCHIVE_NAME" "./$ARCHIVE_NAME"
138+
137139
ARCHIVE_SIZE=$(du -sh "$ARCHIVE_NAME" | cut -f1)
138140
echo "archive_name=$ARCHIVE_NAME" >> "$GITHUB_OUTPUT"
139141
echo "archive_size=$ARCHIVE_SIZE" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)