Skip to content

Commit

Permalink
refactor: Use S3 public endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Oct 18, 2024
1 parent 118e07a commit f128d29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.EXPLORER_TEAM_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.EXPLORER_TEAM_AWS_DEFAULT_REGION }}
VITE_AWS_S3_BUCKET: ${{ secrets.EXPLORER_TEAM_S3_BUCKET }}
VITE_AWS_S3_BUCKET_PUBLIC_URL: ${{ vars.EXPLORER_TEAM_S3_BUCKET_PUBLIC_URL }}

# Download 'SSLcom/esigner-codesign' to a folder called 'esigner-codesign' in the root of the project
- name: Checkout esigner-codesign repository (Windows)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.EXPLORER_TEAM_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.EXPLORER_TEAM_AWS_DEFAULT_REGION }}
VITE_AWS_S3_BUCKET: ${{ secrets.EXPLORER_TEAM_S3_BUCKET }}
VITE_AWS_S3_BUCKET_PUBLIC_URL: ${{ vars.EXPLORER_TEAM_S3_BUCKET_PUBLIC_URL }}

- name: Generate Release Version
id: version
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/s3/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export function getBucketURL(): string {
return import.meta.env.VITE_AWS_ENDPOINT_URL
? `${import.meta.env.VITE_AWS_ENDPOINT_URL}/${import.meta.env.VITE_AWS_S3_BUCKET}`
: `https://${import.meta.env.VITE_AWS_S3_BUCKET}.s3.amazonaws.com`;
: import.meta.env.VITE_AWS_S3_BUCKET_PUBLIC_URL;
}

0 comments on commit f128d29

Please sign in to comment.