Skip to content

Commit

Permalink
ci: check if old update site was downloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Mar 19, 2024
1 parent 4cacda8 commit 8bdae75
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/publish-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ jobs:
rm updatesite/p2/*_version.json || true # delete old version files that had wrong file name
shell: bash

- name: Verify that update site was downloaded
run: |
folder=upatesite/p2
if [ -z "$(ls -A "$folder")" ]; then
echo "Error: The folder $folder is empty. No existing update site was downloaded"
exit 1
else
echo "The folder $folder is not empty."
fi
shell: bash

- name: Create update site and append to existing one
env:
# CI marker
Expand All @@ -90,7 +101,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_ARCHIVE_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILD_ARCHIVE_SECRET_KEY }}
run: |
aws s3 sync updatesite/p2 s3://build-artifacts.wetransform.to/p2/offline-resources/site --acl public-read --region eu-central-1
aws s3 sync updatesite/p2 s3://build-artifacts.wetransform.to/p2/offline-resources/site --acl public-read --delete --region eu-central-1
shell: bash

- name: Notify slack on failure
Expand Down

0 comments on commit 8bdae75

Please sign in to comment.