Skip to content

Commit

Permalink
Fix secret names in 3ds staging action so they match production (#404)
Browse files Browse the repository at this point in the history
* Fix secret names so they match production

* Use build action
  • Loading branch information
donaltuohy authored Sep 9, 2024
1 parent 0bfe097 commit 0490a48
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 37 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ jobs:
with:
name: ui-components-build
path: packages/ui-components/dist
- name: Upload 3ds build
uses: actions/upload-artifact@v4
with:
name: 3ds-build
path: packages/3ds/dist
- name: Upload react build
uses: actions/upload-artifact@v4
with:
Expand Down
34 changes: 5 additions & 29 deletions .github/workflows/deploy-3ds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ on:
description: "Name of the job"
required: true
type: string
vite-evervault-js-url:
description: "URL where the JS SDK should be loaded from"
required: true
type: string
vite-keys-url:
description: "URL where keys will be fetched from"
required: true
type: string
vite-api-url:
description: "API endpoint"
required: true
type: string
secrets:
aws-access-key-id:
description: "AWS Access Key ID"
Expand All @@ -40,30 +28,18 @@ jobs:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
name: ${{ inputs.name }}
env:
VITE_EVERVAULT_JS_URL: ${{ inputs.vite-evervault-js-url }}
VITE_KEYS_URL: ${{ inputs.vite-keys-url }}
VITE_API_URL: ${{ inputs.vite-api-url }}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: pnpm/action-setup@v2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm --filter @evervault/3ds... build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.aws-access-key-id }}
aws-secret-access-key: ${{ secrets.aws-secret-access-key }}
aws-region: "us-east-1"
- name: Download Build Artifacts
uses: actions/download-artifact@v4.1.8
with:
name: 3ds-build
path: dist
- name: S3 Deploy
working-directory: packages/3ds
run: aws s3 cp dist s3://${{ secrets.aws-s3-bucket }}/ --recursive
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,16 @@ jobs:
aws-s3-bucket: ${{ secrets.UI_COMPONENTS_S3_BUCKET }}
aws-cloudfront-distribution-id: ${{ secrets.UI_COMPONENTS_CLOUDFRONT_DISTRIBUTION_ID }}
deploy-3ds:
needs: build
uses: ./.github/workflows/deploy-3ds.yml
with:
environment: "staging"
name: "Deploy to Staging"
vite-evervault-js-url: "https://js.evervault.io/v2"
vite-keys-url: "https://keys.evervault.io"
vite-api-url: "https://api.evervault.io"
secrets:
aws-access-key-id: ${{ secrets.PUBLIC_REPO_AWS_ACCESS_KEY_ID_STAGING }}
aws-secret-access-key: ${{ secrets.PUBLIC_REPO_AWS_SECRET_ACCESS_KEY_STAGING }}
aws-s3-bucket: ${{ secrets.TDS_S3_BUCKET }}
aws-cloudfront-distribution-id: ${{ secrets.TDS_CLOUDFRONT_DISTRIBUTION_ID }}
aws-s3-bucket: ${{ secrets.TDS_AWS_S3_BUCKET }}
aws-cloudfront-distribution-id: ${{ secrets.TDS_AWS_CLOUDFRONT_DISTRIBUTION_ID }}
release:
name: Release
runs-on: ubuntu-latest
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
aws-cloudfront-distribution-id: ${{ secrets.INPUTS_CLOUDFRONT_DISTRIBUTION_ID }}
deploy-ui-components:
if: contains(github.event.release.tag_name, '@evervault/ui-components')
needs: build
uses: ./.github/workflows/deploy-ui-components.yml
with:
environment: "production"
Expand All @@ -57,13 +58,11 @@ jobs:
aws-cloudfront-distribution-id: ${{ secrets.UI_COMPONENTS_CLOUDFRONT_DISTRIBUTION_ID }}
deploy-3ds:
if: contains(github.event.release.tag_name, '@evervault/3ds')
needs: build
uses: ./.github/workflows/deploy-3ds.yml
with:
environment: "production"
name: "Deploy to Production"
vite-evervault-js-url: "https://js.evervault.com/v2"
vite-keys-url: "https://keys.evervault.com"
vite-api-url: "https://api.evervault.com"
secrets:
aws-access-key-id: ${{ secrets.PUBLIC_REPO_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PUBLIC_REPO_AWS_SECRET_ACCESS_KEY }}
Expand Down

0 comments on commit 0490a48

Please sign in to comment.