Replies: 1 comment 2 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.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
schedule
case: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
schedule
elements supported aninputs
key that becamegithub.event.inputs
when the workflow is executing for that schedule.Then I could do the following:
Beta Was this translation helpful? Give feedback.
All reactions