-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Call dynamic-readme reusable workflow #57
Conversation
We want to have a way to edit our README footer at one place and have the changes from there be propagated to our repos. By adding this snippet in the README, we call this reusable workflow: https://github.com/thoughtbot/templates/blob/main/.github/workflows/dynamic-readme.yaml that renders and updates the README footer dynamically.
[thoughtbot]: https://thoughtbot.com/?utm_source=github | ||
[community]: https://thoughtbot.com/community?utm_source=github | ||
[hire]: https://thoughtbot.com/hire-us?utm_source=github | ||
<!-- START /templates/footer.md --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate you've probably done this elsewhere by now, but the leading /
implies to me the start of a filesystem, which it presumably isn't. Can that go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Nick. If I remove that, the workflow can't find the file in the templates repo. I tried that before and it only worked like this. I was trying a bunch of things at the time, though. Maybe it's not needed anymore? I can try removing it and see if it works later this week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting, that's weird! Let me know how you get on, I'm curious!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks for your patience, Nick! I tested without the leading /
on this test repo and it worked:
https://github.com/thoughtbot/testing-reusable-workflow
so we're good to go without it. Thanks for bringing that up. I also updated the original workflow to open a PR with the README changes because some repos have a protected branch rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing it in thoughtbot/templates#31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So after merging that, the dynamic readme doesn't work. I don't really know why but removing the "/" doesn't work, so we need it.
We want to have a way to edit our README footer at one place and have the changes from there be propagated to our repos.
By adding this snippet in the README, we call this reusable workflow: https://github.com/thoughtbot/templates/blob/main/.github/workflows/dynamic-readme.yaml that renders the README footer dynamically.
This workflow has been updated to accommodate repositories that have main branch rules. To generate the README dynamically, you’ll need to merge a PR with the README changes. That will trigger the GitHub workflow.
The PR won’t be generated if the footer does not have any differences. It will only be open if there’s an update to the footer snippet.