Replies: 3 comments 5 replies
-
|
For future readers, this can be made somewhat nicer by (ab)using name: Reset Environment
on:
workflow_dispatch:
inputs:
environment:
description: "Environment to reset"
required: true
schedule:
- cron: "..."
env:
ENVIRONMENT: ${{ github.event.inputs.environment || 'staging' }} # centralize fallbacks
steps:
- uses: whatever/whatever@x # no prep step needed
with:
env: ${{ env.ENVIRONMENT }}You still cannot do multiple schedules (you only get one fallback-when-unset), nor is it self-documenting in the |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
I think the schedule triggered workflows should at least honor the default values set in workflow_dispatch.inputs or allow to set defaults for schedule (duplication in many cases probably). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
I have a few workflows that can be run manually but also run on a schedule:
Imagine there are many such inputs.
I end up having to basically check for empty inputs and default it to what should be used in the
schedulecase:Again, imagine there are many such inputs.
This is cumbersome, hard to reason about, and error-prone. It also means that I can't schedule the workflow additional times with other values. There is only the one "not
workflow_dispatch" branch available.All of this would be solved if
scheduleelements supported aninputskey that becamegithub.event.inputswhen the workflow is executing for that schedule.Then I could do the following:
Beta Was this translation helpful? Give feedback.
All reactions