Skip to content

Commit

Permalink
feat: allow to pass mailprovider as a workflow input
Browse files Browse the repository at this point in the history
  • Loading branch information
flea89 committed Nov 25, 2022
1 parent fdfa333 commit 70d895a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/cron-storage-limits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
# Including 'workflow_dispatch' here allows the job to be triggered manually,
# as well as on the schedule.
workflow_dispatch:
inputs:
email_provider:
type: choice
description: The mail provider used to send emails to users. Use 'dummy' if you want only to log emails to the console. If not specified the default mail provider is used in prod and the dummy one is used in staging.
options:
- mailchimp
- dummy

jobs:
send-notifications:
Expand Down Expand Up @@ -42,6 +49,6 @@ jobs:
PROD_PG_REST_URL: ${{ secrets.PROD_PG_REST_URL }}
STAGING_PG_REST_URL: ${{ secrets.STAGING_PG_REST_URL }}
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
EMAIL_PROVIDER: ${{ (matrix.env == 'staging' && 'dummy') || '' }} # use dummy provider in staging, while using the default provider in prod.
EMAIL_PROVIDER: ${{ github.event.inputs.env || ((matrix.env == 'staging' && 'dummy') || '') }} # use dummy provider in staging, while using the default provider in prod.
run: npm run start:storage -w packages/cron

0 comments on commit 70d895a

Please sign in to comment.