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

GitHub Actions workflow_dispatch #436

Merged
merged 8 commits into from
Aug 26, 2021
Merged

Conversation

dhimmel
Copy link
Member

@dhimmel dhimmel commented Aug 25, 2021

This enables GitHub actions to run upon a workflow_dispatch event. Once in the main branch, this enables the following "Run workflow" menu under the Manubot workflow:

image

I envision this being most helpful for exporting a DOCX or LaTeX version of the manuscript on an ad-hoc basis.

It would also be nice to be able to specify a past version of the repository (like a commit or tag) and rebuild that, for example to add a DOCX to an earlier version. However, that is more challenging (see dbecc62 which didn't properly override GIHTUB_SHA).

@dhimmel
Copy link
Member Author

dhimmel commented Aug 25, 2021

I noticed the following issue with the output variables.json under manubot.ci_source.job_url:

      "job_url": "https://github.com/dhimmel/manubot-rootstock/runs/__run_4"

job_url is set here, so that might need some tweaking.

@dhimmel dhimmel requested a review from agitter August 25, 2021 20:08
workflow_dispatch:
inputs:
BUILD_PDF:
description: generate PDF output
Copy link
Member Author

@dhimmel dhimmel Aug 25, 2021

Choose a reason for hiding this comment

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

Should we append (true or false) to description or is that obvious?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should append (true or false). We may also need to make build.sh more robust to variations in user input here. The current version is case-sensitive.

Copy link
Member Author

@dhimmel dhimmel Aug 26, 2021

Choose a reason for hiding this comment

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

made case insensitive in ec0e455. The ,, bash syntax for lowercasing requires bash >= 4. Not sure if that will be an issue. https://en.wikipedia.org/wiki/Bash_(Unix_shell)#Release_history

Copy link
Member

Choose a reason for hiding this comment

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

I'm comfortable requiring bash >= 4 given that release date.

dhimmel added a commit to dhimmel/manubot that referenced this pull request Aug 25, 2021
instead of GITHUB_ACTION which had values like __run_4 on
workflow_dispatch, and appears to have produced broken URLs in the
past.

refs manubot/rootstock#436 (comment)
dhimmel added a commit to manubot/manubot that referenced this pull request Aug 25, 2021
merges #300
refs manubot/rootstock#436 (comment)

instead of GITHUB_ACTION which had values like __run_4 on workflow_dispatch,
and appears to have produced broken URLs in the past.
@AppVeyorBot
Copy link

AppVeyor build 1.0.249 for commit b88e454 is now complete.

Found 52 potential spelling error(s). Preview:content/02.delete-me.md:44:adipiscing
content/02.delete-me.md:44:aliqua
content/02.delete-me.md:44:amet
content/02.delete-me.md:44:consectetur
content/02.delete-me.md:44:dolore
content/02.delete-me.md:44:eiusmod
content/02.delete-me.md:44:elit
content/02.delete-me.md:44:incididunt
content/02.delete-me.md:44:ipsum
content/02.delete-me.md:44:labore
content/02.delete-me.md:44:Lorem
content/02.delete-me.md:44:magna
content/02...
The rendered manuscript from this build is temporarily available for download at:

Copy link
Member

@agitter agitter left a comment

Choose a reason for hiding this comment

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

This looks useful.

workflow_dispatch:
inputs:
BUILD_PDF:
description: generate PDF output
Copy link
Member

Choose a reason for hiding this comment

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

I think we should append (true or false). We may also need to make build.sh more robust to variations in user input here. The current version is case-sensitive.

@AppVeyorBot
Copy link

AppVeyor build 1.0.250 for commit 6d19282 failed.

@dhimmel dhimmel force-pushed the workflow-dispatch branch from 6d19282 to ec0e455 Compare August 26, 2021 14:28
@AppVeyorBot
Copy link

AppVeyor build 1.0.251 for commit ec0e455 is now complete.

Found 52 potential spelling error(s). Preview:content/02.delete-me.md:44:adipiscing
content/02.delete-me.md:44:aliqua
content/02.delete-me.md:44:amet
content/02.delete-me.md:44:consectetur
content/02.delete-me.md:44:dolore
content/02.delete-me.md:44:eiusmod
content/02.delete-me.md:44:elit
content/02.delete-me.md:44:incididunt
content/02.delete-me.md:44:ipsum
content/02.delete-me.md:44:labore
content/02.delete-me.md:44:Lorem
content/02.delete-me.md:44:magna
content/02...
The rendered manuscript from this build is temporarily available for download at:

@dhimmel dhimmel merged commit 0977660 into manubot:main Aug 26, 2021
@dhimmel dhimmel deleted the workflow-dispatch branch August 26, 2021 18:01
ploegieku added a commit to ploegieku/2023-functional-homology-paper that referenced this pull request Aug 6, 2024
merges manubot/rootstock#436

* allows ad-hoc builds of main that can set BUILD_DOCX=true
* upgrade manubot to fix GitHub Actions URLs
* build.sh: set variable defaults and lowercase
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