rename envs in workflow

This commit is contained in:
Paweł Grabarz 2024-10-21 16:20:34 +02:00
parent 39aef4cf6e
commit 97c6b6bc05
2 changed files with 25 additions and 19 deletions

View File

@ -18,20 +18,33 @@ jobs:
repository-cache: true
- uses: actions/checkout@v4
- name: Expose env variables
env:
VITE_API_URL: "${{ vars.ENSO_CLOUD_API_URL }}"
VITE_CHAT_URL: "${{ vars.ENSO_CLOUD_CHAT_URL }}"
VITE_COGNITO_DOMAIN: "${{ vars.ENSO_CLOUD_COGNITO_DOMAIN }}"
VITE_COGNITO_REGION: "${{ vars.ENSO_CLOUD_COGNITO_REGION }}"
VITE_COGNITO_USER_POOL_ID: "${{ vars.ENSO_CLOUD_COGNITO_USER_POOL_ID }}"
VITE_COGNITO_USER_POOL_WEB_CLIENT_ID: "${{ vars.ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID }}"
VITE_ENVIRONMENT: "${{ vars.ENSO_CLOUD_ENVIRONMENT }}"
VITE_GOOGLE_ANALYTICS_TAG: "${{ vars.ENSO_CLOUD_GOOGLE_ANALYTICS_TAG }}"
VITE_SENTRY_DSN: "${{ vars.ENSO_CLOUD_SENTRY_DSN }}"
VITE_STRIPE_KEY: "${{ vars.ENSO_CLOUD_STRIPE_KEY }}"
VITE_ENSO_AG_GRID_LICENSE_KEY: "${{ vars.ENSO_AG_GRID_LICENSE_KEY }}"
VITE_ENSO_MAPBOX_API_TOKEN: "${{ vars.ENSO_MAPBOX_API_TOKEN }}"
run: |
cat << END > app/gui/.env.production
VITE_ENSO_CLOUD_API_URL="${{ vars.ENSO_CLOUD_API_URL }}"
VITE_ENSO_CLOUD_CHAT_URL="${{ vars.ENSO_CLOUD_CHAT_URL }}"
VITE_ENSO_CLOUD_COGNITO_DOMAIN="${{ vars.ENSO_CLOUD_COGNITO_DOMAIN }}"
VITE_ENSO_CLOUD_COGNITO_REGION="${{ vars.ENSO_CLOUD_COGNITO_REGION }}"
VITE_ENSO_CLOUD_COGNITO_USER_POOL_ID="${{ vars.ENSO_CLOUD_COGNITO_USER_POOL_ID }}"
VITE_ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID="${{ vars.ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID }}"
VITE_ENSO_CLOUD_ENVIRONMENT="${{ vars.ENSO_CLOUD_ENVIRONMENT }}"
VITE_ENSO_CLOUD_GOOGLE_ANALYTICS_TAG="${{ vars.ENSO_CLOUD_GOOGLE_ANALYTICS_TAG }}"
VITE_ENSO_CLOUD_SENTRY_DSN="${{ vars.ENSO_CLOUD_SENTRY_DSN }}"
VITE_ENSO_CLOUD_STRIPE_KEY="${{ vars.ENSO_CLOUD_STRIPE_KEY }}"
VITE_ENSO_AG_GRID_LICENSE_KEY="${{ vars.ENSO_AG_GRID_LICENSE_KEY }}"
VITE_ENSO_MAPBOX_API_TOKEN="${{ vars.ENSO_MAPBOX_API_TOKEN }}"
VITE_API_URL="$VITE_API_URL"
VITE_CHAT_URL="$VITE_CHAT_URL"
VITE_COGNITO_DOMAIN="$VITE_COGNITO_DOMAIN"
VITE_COGNITO_REGION="$VITE_COGNITO_REGION"
VITE_COGNITO_USER_POOL_ID="$VITE_COGNITO_USER_POOL_ID"
VITE_COGNITO_USER_POOL_WEB_CLIENT_ID="$VITE_COGNITO_USER_POOL_WEB_CLIENT_ID"
VITE_ENVIRONMENT="$VITE_ENVIRONMENT"
VITE_GOOGLE_ANALYTICS_TAG="$VITE_GOOGLE_ANALYTICS_TAG"
VITE_SENTRY_DSN="$VITE_SENTRY_DSN"
VITE_STRIPE_KEY="$VITE_STRIPE_KEY"
VITE_ENSO_AG_GRID_LICENSE_KEY="$VITE_ENSO_AG_GRID_LICENSE_KEY"
VITE_ENSO_MAPBOX_API_TOKEN="$VITE_ENSO_MAPBOX_API_TOKEN"
VITE_CLOUD_BUILD="false"
END
- run: bazel build //app/gui:dist

View File

@ -56,10 +56,6 @@ const envs = await Promise.all(
const combinedEnvs = Object.assign({}, ...envs)
console.error('==============')
console.error('ENVS:')
console.error(combinedEnvs)
/**
* Map of calls mkdir performed so far, to avoid calling it twice on the same path.
* @type {Map<string, Promise<unknown>>}
@ -213,9 +209,6 @@ await processAllFiles()
if (errors.length > 0) {
console.error('==========================')
console.error('cwd:', process.cwd())
console.error('inputDirectory:', inputDirectory)
console.error('outputDirectory:', outputDirectory)
console.error(
`Found ${errors.length} error${errors.length > 1 ? 's' : ''} during bundle postprocessing:`,
)