0
0
mirror of https://github.com/sp-tarkov/build.git synced 2025-02-12 14:50:44 -05:00

Trying Different Delete Method

Building a file list and then using the list to delete.
This commit is contained in:
Refringe 2024-05-15 13:16:51 -04:00
parent 413bdbfc93
commit 5de2bd28b6
Signed by: Refringe
GPG Key ID: 7715B85B4A6306ED

View File

@ -557,16 +557,19 @@ jobs:
ls -lah
echo "Current Remote Directory:"
rclone lsd r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf
rclone ls r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf
# Remove old 7z files from the bucket
rclone --dry-run -vv delete r2:${{ secrets.R2_BUCKET_NAME }}/*.7z --config /workspace/SPT-AKI/Build/rclone.conf
rclone lsf r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf --files-only --include="*.7z" --absolute > files-to-remove.txt
echo "Files to be deleted:"
cat files-to-remove.txt
rclone delete r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf --files-from=files-to-remove.txt --max-depth=1 --dry-run -vv
# Upload the file using rclone with the above config
rclone --dry-run -vv copy "/workspace/SPT-AKI/Build/${{ steps.generate-filename.outputs.build_name }}" r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf
rclone copy "/workspace/SPT-AKI/Build/${{ steps.generate-filename.outputs.build_name }}" r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf --dry-run -vv
# Upload the JSON file using rclone with the above config
rclone --dry-run -vv copy "/workspace/SPT-AKI/Build/release.json" r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf
rclone copy "/workspace/SPT-AKI/Build/release.json" r2:${{ secrets.R2_BUCKET_NAME }} --config /workspace/SPT-AKI/Build/rclone.conf --dry-run -vv
shell: bash
- name: Upload Release to HTTPS Source