Skip to content

Commit

Permalink
added rm -rf to remove folders from zip, and delete tar.gz after deco…
Browse files Browse the repository at this point in the history
…mpression.
  • Loading branch information
Bioblaze committed Feb 24, 2025
1 parent 3c51520 commit abc98ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/multi-folder-zip/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ runs:
# Zip the folder
ZIP_FILE="$OUTPUT_DIR/${NEW_FOLDER_NAME}.zip"
(cd "$NEW_FOLDER_PATH" && zip -q -9 -r -D "$ZIP_FILE" .)
rm -rf $NEW_FOLDER_PATH
# zip -r "$ZIP_FILE" "$NEW_FOLDER_PATH" > /dev/null
if [ $? -eq 0 ]; then
echo "Successfully zipped $NEW_FOLDER_PATH to $ZIP_FILE" >> $GITHUB_STEP_SUMMARY
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/multi-uncompress-tar-gz/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ runs:
echo "Uncompressing $TAR_FILE directly into $OUTPUT_DIR" >> $GITHUB_STEP_SUMMARY
if tar --strip-components=1 -xzf "$TAR_FILE" -C "$OUTPUT_DIR" >> $GITHUB_STEP_SUMMARY 2>&1; then
echo "Successfully uncompressed $TAR_FILE" >> $GITHUB_STEP_SUMMARY
rm -rf $TAR_FILE
echo "Successfully deleted $TAR_FILE" >> $GITHUB_STEP_SUMMARY
UNCOMPRESSED_FOLDERS+=("$OUTPUT_DIR")
else
echo "Error: Failed to uncompress $TAR_FILE" >> $GITHUB_STEP_SUMMARY
Expand All @@ -79,6 +81,8 @@ runs:
echo "Uncompressing $TAR_FILE into $TARGET_FOLDER" >> $GITHUB_STEP_SUMMARY
if tar -xzf "$TAR_FILE" -C "$TARGET_FOLDER" >> $GITHUB_STEP_SUMMARY 2>&1; then
echo "Successfully uncompressed $TAR_FILE" >> $GITHUB_STEP_SUMMARY
rm -rf $TAR_FILE
echo "Successfully deleted $TAR_FILE" >> $GITHUB_STEP_SUMMARY
UNCOMPRESSED_FOLDERS+=("$TARGET_FOLDER")
else
echo "Error: Failed to uncompress $TAR_FILE" >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit abc98ac

Please sign in to comment.