Skip to content

Commit

Permalink
wip(build): actually add delete option, add dry run flag to test stat…
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Aug 5, 2024
1 parent 7c568b6 commit 66bc1a6
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,48 +216,48 @@ jobs:
uses: google-github-actions/upload-cloud-storage@v2
with:
path: client/build
destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-1
destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-5
parent: false
gzip: true
resumable: false
concurrency: 500
process_gcloudignore: true

- name: Upload files without deleting
if: ${{ ! vars.SKIP_BUILD }}
uses: google-github-actions/upload-cloud-storage@v2
with:
path: client/build
destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-2
parent: false
gzip: true
resumable: false
concurrency: 500
process_gcloudignore: true

- name: Upload files without deleting
if: ${{ ! vars.SKIP_BUILD }}
uses: google-github-actions/upload-cloud-storage@v2
with:
path: client/build
destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-3
parent: false
gzip: true
resumable: false
concurrency: 500
process_gcloudignore: true

- name: Upload files without deleting
if: ${{ ! vars.SKIP_BUILD }}
uses: google-github-actions/upload-cloud-storage@v2
with:
path: client/build
destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-4
parent: false
gzip: true
resumable: false
concurrency: 500
process_gcloudignore: true
# - name: Upload files without deleting
# if: ${{ ! vars.SKIP_BUILD }}
# uses: google-github-actions/upload-cloud-storage@v2
# with:
# path: client/build
# destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-2
# parent: false
# gzip: true
# resumable: false
# concurrency: 500
# process_gcloudignore: true

# - name: Upload files without deleting
# if: ${{ ! vars.SKIP_BUILD }}
# uses: google-github-actions/upload-cloud-storage@v2
# with:
# path: client/build
# destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-3
# parent: false
# gzip: true
# resumable: false
# concurrency: 500
# process_gcloudignore: true

# - name: Upload files without deleting
# if: ${{ ! vars.SKIP_BUILD }}
# uses: google-github-actions/upload-cloud-storage@v2
# with:
# path: client/build
# destination: ${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-4
# parent: false
# gzip: true
# resumable: false
# concurrency: 500
# process_gcloudignore: true

- name: Authenticate with GCP
if: ${{ ! vars.SKIP_FUNCTION }}
Expand Down Expand Up @@ -338,19 +338,19 @@ jobs:
if: ${{ ! vars.SKIP_BUILD }}
run: |-
rm -rf client/build/static # necessary to test we don't delete static in the following commands
gsutil -mq rsync -ry '^static/' -x '^.*/plain.html$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-1
gsutil -m rsync -n -dry '^static/' -x '^.*/plain.html$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-5
- name: Delete old files with gsutil (checksum)
if: ${{ ! vars.SKIP_BUILD }}
run: |-
gsutil -mq rsync -rcy '^static/' -x '^.*/plain.html$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-2
gsutil -m rsync -n -drcy '^static/' -x '^.*/plain.html$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-5
- name: Delete old files with gcloud storage (mtime)
if: ${{ ! vars.SKIP_BUILD }}
run: |-
gcloud storage rsync --quiet --verbosity=error --continue-on-error --recursive --exclude='^(.*/plain.html)|(static/.*)$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-3
gcloud storage rsync --dry-run --delete-unmatched-destination-objects --quiet --verbosity=error --continue-on-error --recursive --exclude='^(.*/plain.html)|(static/.*)$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-5
- name: Delete old files with gcloud storage (checksum)
if: ${{ ! vars.SKIP_BUILD }}
run: |-
gcloud storage rsync --quiet --verbosity=error --continue-on-error --checksums-only --recursive --exclude='^(.*/plain.html)|(static/.*)$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-4
gcloud storage rsync --dry-run --delete-unmatched-destination-objects --quiet --verbosity=error --continue-on-error --checksums-only --recursive --exclude='^(.*/plain.html)|(static/.*)$' client/build gs://${{ vars.GCP_BUCKET_NAME }}/upload-then-delete-5

0 comments on commit 66bc1a6

Please sign in to comment.