-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add upload to s3 workflow #831
Conversation
…path in s3 with the release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@austenLacy, Looks good. Thank you for your help on this!
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: 'us-east-1' | ||
SOURCE_DIR: 'dist' | ||
DEST_DIR: rollbarjs/$GITHUB_REF # GITHUB_REF is the tag of the release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we use rollbar.js/2.2.8/
(for ex) in the cloudflare URL. What's expected with this in combination with cloudfront?
I guess will be /rollbarjs/v2.2.8
since we do tags with v
as prefix no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It ends up being /rollbarjs/refs/tags/v2.2.8
:
https://cdn.rollbar.com/rollbarjs/refs/tags/v2.14.10/rollbar.min.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, there is no way to simplify that schema I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using jakejarvis/s3-sync-action as is, and it uses $GITHUB_REF
as is. With a fork and some custom code we could do better.
I thought the same thing when I first saw it, but also noted that the cdnjs URLs had a similar issue by containing /ajax/libs/
. https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.14.4/rollbar.min.js
So we could do better, but are not worse off than what we had.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 💯
* test out workflow * add missing subdir in github workflows * test out workflow with tag * only run workflow when a release is published and use the tag as the path in s3 with the release * ping action version * use pinned version and revert back to only on publish * use correct rollbarjs prefix * test with prefix again just to make sure * verified prefix works and change workflow job name to be more descriptive
We are moving to use AWS CloudFront backed by S3 as our CDN moving forward. This automates the upload of the various rollbar.js distributions to S3.