Skip to content

Commit 4bd6fe5

Browse files
author
RM
committed
Lookback days is limited to 100 for gcloud run
1 parent 11d92e6 commit 4bd6fe5

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/deploy-chipnik-monitor.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,23 @@ on:
77
paths:
88
- "chipnik_monitor/**"
99
workflow_dispatch:
10+
inputs:
11+
DAYS_BACK_LIMIT:
12+
description: "Lookback window in days"
13+
required: false
14+
default: "100"
1015
workflow_call:
16+
inputs:
17+
DAYS_BACK_LIMIT:
18+
required: false
19+
type: string
20+
default: "100"
1121

1222
env:
1323
PROJECT_ID: demetereye
1424
REGION: us-central1
1525
SERVICE_NAME: demetereye-monitor
26+
DAYS_BACK_LIMIT: "100"
1627

1728
jobs:
1829
deploy:
@@ -40,6 +51,7 @@ jobs:
4051
EARTHDATA_BEARER_TOKEN: ${{ secrets.EARTHDATA_BEARER_TOKEN }}
4152
MONGO_URI: ${{ secrets.MONGO_URI }}
4253
MONGO_DB: ${{ secrets.MONGO_DB }}
54+
DAYS_BACK_LIMIT: ${{ inputs.DAYS_BACK_LIMIT || github.event.inputs.DAYS_BACK_LIMIT || env.DAYS_BACK_LIMIT }}
4355
working-directory: chipnik_monitor
4456
run: |
4557
gcloud run deploy "$SERVICE_NAME" \
@@ -49,4 +61,4 @@ jobs:
4961
--min-instances 0 --max-instances 2 \
5062
--memory 512Mi --cpu 1 \
5163
--no-cpu-throttling \
52-
--set-env-vars EARTHDATA_BEARER_TOKEN=${EARTHDATA_BEARER_TOKEN},MONGO_URI=${MONGO_URI},MONGO_DB=${MONGO_DB}
64+
--set-env-vars EARTHDATA_BEARER_TOKEN=${EARTHDATA_BEARER_TOKEN},MONGO_URI=${MONGO_URI},MONGO_DB=${MONGO_DB},DAYS_BACK_LIMIT=${DAYS_BACK_LIMIT}

0 commit comments

Comments
 (0)