83 lines
4.0 KiB
YAML
83 lines
4.0 KiB
YAML
|
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 }}
|