-
Notifications
You must be signed in to change notification settings - Fork 58
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
Generate help command output for readme with github action #114
Generate help command output for readme with github action #114
Conversation
TestTag not foundHere you can see what happens when the tag is not found: The same will happen if the content of the usage section is already up-to-date. Tag found and content is outdatedHere is a run where it found the tag and updated the content of the usage section: This commit was made by the action: Tag found and content is already up-to-date
Other error handlingCheckout the source code of Know issuesA commit and push created by a github action will not trigger other actions.
|
Instead: remove this and link to https://docs.brew.sh/Manpage#autoupdate-subcommand-interval-options which is automatically updated. |
I did not know this already existed. Still was a lot of fun creating my solution 😀 I will create a new PR. |
After adding 2-3 features with new arguments I got to lazy to manually update the usage section in the
README.md
after every change.So I've decided to write a simple github action which will handle the generation.
Usage
Implementation
Action
The github action
generate-help-output.yml
will run on every push.If a change triggers a updates output of the
homebrew autoupdate --help
command, the action will create a commit and push the updatedREADME.md
file.Script
The python 3 script
generate-help-output.py
will generate the output of the--help
command and compare it to the current output in the usage section of theREADME.md
file.I will add the required
start
andstop
tags after the initial PR creation, so we can see the changes made by the action.