nextstrain / forecasts-ncov

SARS-CoV-2 variant growth rates and frequency forecasts
https://nextstrain.org/sars-cov-2/forecasts/
7 stars 2 forks source link

.github/workflows: use vars.SLACK_CHANNELS as default #61

Closed joverlee521 closed 1 year ago

joverlee521 commented 1 year ago

Description of proposed changes

I keep forgetting that the workflow_dispatch.inputs default value is only applied when the workflow is triggered via a workflow dispatch. It does not get used when the workflow is triggered via the repository dispatch event in our automated triggers. This results in an empty slack channel value¹ so the upload messages cannot be sent to Slack.

Outside of this commit, I've set a repository level variable that is accessible via the vars context in the with block. This is used as the default value and the workflow_dispatch.input can continue to override it for trial runs.

¹ https://github.com/nextstrain/forecasts-ncov/actions/runs/6092447027/job/16530571876#step:5:13

Related issue(s)

Follow up on https://github.com/nextstrain/forecasts-ncov/pull/60

Checklist

joverlee521 commented 12 months ago

Confirmed Slack messages came through for the GISAID side in the auto-triggered run last night.

Open side did not get triggered due to unrelated failure upstream in ncov-ingest, but I expect to work in future runs.