Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add input for workflow dispatch for W3C publish workflow #1791

Merged
merged 3 commits into from
Aug 22, 2024
Merged

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented Aug 22, 2024

When manually dispatching workflows, inputs can be collected from the dispatching user and passed to the workflow. Use this feature to allow manually setting the W3C_STATE of the document. This will let us publish CR drafts on every push (once we update the default state from WD) and CR snapshots on demand.

When manually dispatching workflows, inputs can be collected from the
dispatching user and passed to the workflow. Use this feature to
allow manually setting the W3C_STATE of the document. This will
let us publish CR drafts on every push (once we update the default
state from WD) and CR snapshots on demand.
Copy link
Collaborator

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat. My confidence in assessing whether this will work is low, but I'm okay with testing in production.

.github/workflows/w3c-publish.yml Outdated Show resolved Hide resolved
@dschuff
Copy link
Member Author

dschuff commented Aug 22, 2024

I actually tested it in my fork (https://github.com/dschuff/spec/actions) and it seems to work.

@dschuff dschuff merged commit ee82c8e into main Aug 22, 2024
5 checks passed
@rossberg
Copy link
Member

Cool, but how does this materialise in the UI? Does the user have to enter the exact strings WD or CR for this to work correctly? Would it be more robust to make the input a Boolean flag?

@rossberg rossberg deleted the dispatch branch August 28, 2024 10:38
@dschuff
Copy link
Member Author

dschuff commented Aug 29, 2024

It can be triggered either on the web UI, by clicking on the actions tab, then on workflow name on the left, and then picking 'Run workflow' on the right (screenshot below), or via the gh CLI tool (e.g. gh workflow run w3c-publish.yml -R WebAssembly/spec -F w3c-status=CR).

Right now, yes the user has to enter the exact strings (e.g. CR, CRD, WD, ED), and yes it would be more robust with a constrained option (for now I left it freeform so I could try all of those). I'm not actually sure what other types or constraints are available here but I agree it makes sense to add what we can.

image

@rossberg
Copy link
Member

I suppose that's fine, but we should perhaps document the valid options somewhere in the repo, and when to use which.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants