Skip to content

Commit dafa08a

Browse files
committed
feat: allow to pass mailprovider as a workflow input
1 parent fdfa333 commit dafa08a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/cron-storage-limits.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
# Including 'workflow_dispatch' here allows the job to be triggered manually,
88
# as well as on the schedule.
99
workflow_dispatch:
10+
inputs:
11+
email_provider:
12+
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.
13+
options:
14+
- mailchimp
15+
- dummy
1016

1117
jobs:
1218
send-notifications:
@@ -15,7 +21,7 @@ jobs:
1521
strategy:
1622
fail-fast: false
1723
matrix:
18-
env: ['staging', 'production']
24+
env: ['staging']
1925
timeout-minutes: 340
2026
steps:
2127
- uses: actions/checkout@v2
@@ -42,6 +48,6 @@ jobs:
4248
PROD_PG_REST_URL: ${{ secrets.PROD_PG_REST_URL }}
4349
STAGING_PG_REST_URL: ${{ secrets.STAGING_PG_REST_URL }}
4450
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
45-
EMAIL_PROVIDER: ${{ (matrix.env == 'staging' && 'dummy') || '' }} # use dummy provider in staging, while using the default provider in prod.
51+
EMAIL_PROVIDER: ${{ github.event.inputs.env || ((matrix.env == 'staging' && 'dummy') || '') }} # use dummy provider in staging, while using the default provider in prod.
4652
run: npm run start:storage -w packages/cron
4753

0 commit comments

Comments
 (0)