Check and report chats usage #1503
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check and report chats usage | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
jobs: | |
send: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./packages/scripts | |
env: | |
DATABASE_URL: '${{ secrets.DATABASE_URL }}' | |
ENCRYPTION_SECRET: '${{ secrets.ENCRYPTION_SECRET }}' | |
NEXTAUTH_URL: '${{ secrets.NEXTAUTH_URL }}' | |
NEXT_PUBLIC_VIEWER_URL: '${{ secrets.NEXT_PUBLIC_VIEWER_URL }}' | |
NEXT_PUBLIC_POSTHOG_KEY: '${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }}' | |
NEXT_PUBLIC_POSTHOG_HOST: '${{ secrets.NEXT_PUBLIC_POSTHOG_HOST }}' | |
SMTP_USERNAME: '${{ secrets.SMTP_USERNAME }}' | |
SMTP_PASSWORD: '${{ secrets.SMTP_PASSWORD }}' | |
SMTP_HOST: '${{ secrets.SMTP_HOST }}' | |
SMTP_PORT: '${{ secrets.SMTP_PORT }}' | |
NEXT_PUBLIC_SMTP_FROM: '${{ secrets.NEXT_PUBLIC_SMTP_FROM }}' | |
STRIPE_SECRET_KEY: '${{ secrets.STRIPE_SECRET_KEY }}' | |
STRIPE_STARTER_PRICE_ID: '${{ secrets.STRIPE_STARTER_PRICE_ID }}' | |
STRIPE_STARTER_CHATS_PRICE_ID: '${{ secrets.STRIPE_STARTER_CHATS_PRICE_ID }}' | |
STRIPE_PRO_PRICE_ID: '${{ secrets.STRIPE_PRO_PRICE_ID }}' | |
STRIPE_PRO_CHATS_PRICE_ID: '${{ secrets.STRIPE_PRO_CHATS_PRICE_ID }}' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/[email protected] | |
- run: pnpm i --frozen-lockfile | |
- run: pnpm turbo run checkAndReportChatsUsage |