cal.pub0.org/.github/workflows/production-build.yml

83 lines
4.0 KiB
YAML
Raw Normal View History

Refactors Github Workflows (#7267) * Testing * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update production-build.yml * Tests * Update production-build.yml * Update pr.yml * Update pr.yml * Update nextjs-bundle-analysis.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update production-build.yml * Update pr.yml * Update pr.yml * Update pr.yml * Update pr.yml * test * Test * Revert * TEST * Update production-build.yml * Update production-build.yml * DRY * Fixes * Update action.yml * Update action.yml * Fixes * WIP * Update action.yml * Update action.yml * Abstract playwright cache * Update yarn-e2e.yml * Adds type check * Update pr.yml * Tests * Anotha one * Update action.yml * Update pr.yml * Update action.yml * Cleanup * Update package.json * Update yarn-e2e.yml * Test * Cleanup * Update check-types.yml * Update yarn-install.yml * Update yarn-install.yml * Update yarn-install.yml * Fixes * Fixes * Update pr.yml * Fixes * Removed required checks * WIP * Adjustments * Update action.yml * Update pr.yml * Comments out buildjet * Caches DB * Update lint.yml * Update action.yml * Update action.yml * Update action.yml * Upgrades actions/checkout@v3 * Build fixes * Update nextjs-bundle-analysis.yml * Update nextjs-bundle-analysis.yml * Update nextjs-bundle-analysis.yml * Fixes? * Inherit secrets * Re-enables buildjet * Adds missing build cache to e2e * Revert "Re-enables buildjet" This reverts commit badd655e1edf8c2942582439f9fd48c00f892c38. * Fixes build env * Revert "Revert "Re-enables buildjet"" This reverts commit a1d78e7c12618d14b23bd50540ee005c6a550e7b. * Update .github/actions/cache-db/action.yml * Define CODEOWNERS file (#7245) * Start defining CODEOWNERS file * Update CODEOWNERS --------- Co-authored-by: Omar López <zomars@me.com> * improved brand colors on booking page (#7269) --------- Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2023-02-22 00:10:39 +00:00
name: Production Build
on:
workflow_call:
env:
DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000
NEXTAUTH_SECRET: secret
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
GOOGLE_LOGIN_ENABLED: true
# CRON_API_KEY: xxx
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
DAILY_API_KEY: ${{ secrets.CI_DAILY_API_KEY }}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE: ${{ secrets.NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE }}
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN: 1
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
STRIPE_PRO_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PRO_PLAN_PRODUCT_ID }}
STRIPE_PREMIUM_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PREMIUM_PLAN_PRODUCT_ID }}
STRIPE_FREE_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_FREE_PLAN_PRODUCT_ID }}
PAYMENT_FEE_PERCENTAGE: 0.005
PAYMENT_FEE_FIXED: 10
SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
SAML_ADMINS: pro@example.com
NEXTAUTH_URL: http://localhost:3000/api/auth
NEXT_PUBLIC_IS_E2E: 1
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:12.1
env:
POSTGRES_USER: postgres
POSTGRES_DB: calendso
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/yarn-install
- uses: ./.github/actions/yarn-build
with:
# GitHub Composite actions cannot read secrets, we have to pass them in here
DATABASE_URL: ${{ env.DATABASE_URL }}
NEXT_PUBLIC_WEBAPP_URL: ${{ env.NEXT_PUBLIC_WEBAPP_URL }}
NEXT_PUBLIC_WEBSITE_URL: ${{ env.NEXT_PUBLIC_WEBSITE_URL }}
NEXTAUTH_SECRET: ${{ env.NEXTAUTH_SECRET }}
GOOGLE_API_CREDENTIALS: ${{ env.GOOGLE_API_CREDENTIALS }}
GOOGLE_LOGIN_ENABLED: ${{ env.GOOGLE_LOGIN_ENABLED }}
CALENDSO_ENCRYPTION_KEY: ${{ env.CALENDSO_ENCRYPTION_KEY }}
DAILY_API_KEY: ${{ env.DAILY_API_KEY }}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ env.NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE: ${{ env.NEXT_PUBLIC_STRIPE_PREMIUM_NEW_PLAN_PRICE }}
NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN: ${{ env.NEXT_PUBLIC_IS_PREMIUM_NEW_PLAN }}
STRIPE_PRIVATE_KEY: ${{ env.STRIPE_PRIVATE_KEY }}
STRIPE_CLIENT_ID: ${{ env.STRIPE_CLIENT_ID }}
STRIPE_WEBHOOK_SECRET: ${{ env.STRIPE_WEBHOOK_SECRET }}
STRIPE_PRO_PLAN_PRODUCT_ID: ${{ env.STRIPE_PRO_PLAN_PRODUCT_ID }}
STRIPE_PREMIUM_PLAN_PRODUCT_ID: ${{ env.STRIPE_PREMIUM_PLAN_PRODUCT_ID }}
STRIPE_FREE_PLAN_PRODUCT_ID: ${{ env.STRIPE_FREE_PLAN_PRODUCT_ID }}
PAYMENT_FEE_PERCENTAGE: ${{ env.PAYMENT_FEE_PERCENTAGE }}
PAYMENT_FEE_FIXED: ${{ env.PAYMENT_FEE_FIXED }}
SAML_DATABASE_URL: ${{ env.SAML_DATABASE_URL }}
SAML_ADMINS: ${{ env.SAML_ADMINS }}
NEXTAUTH_URL: ${{ env.NEXTAUTH_URL }}
NEXT_PUBLIC_IS_E2E: ${{ env.NEXT_PUBLIC_IS_E2E }}
TURBO_TOKEN: ${{ env.TURBO_TOKEN }}
TURBO_TEAM: ${{ env.TURBO_TEAM }}