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

Only run this workflow if the README has been updated #1635

Merged
merged 1 commit into from Apr 15, 2024

Conversation

stefannibrasil
Copy link
Contributor

In the templates repo, the update-templates workflow has been updated to accommodate repositories that have main branch rules (like factory_bot). 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 content does not have any differences from the template. The PR will only be opened if there’s an update to the footer snippet.

In this PR, we are limiting this workflow to be triggered only when README changes have been merged to main (where the snippet lives).

@stefannibrasil
Copy link
Contributor Author

Thanks for your patience, @mike-burns this is the follow up of #1630

In summary, some repos have branch protection rules that conflicted with the workflow pushing changes directly to the main branch. In the templates repo, the workflow has been updated to open a PR with the README updates. So it will follow the regular flow of PR -> merge. Thank you!

@@ -82,6 +82,7 @@ software, and may be redistributed under the terms specified in the
[LICENSE]: https://github.com/thoughtbot/factory_bot/blob/main/LICENSE

<!-- START /templates/footer.md -->

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With this change, the workflow will generate an automatic PR with the generated content.

Copy link
Contributor

@mike-burns mike-burns left a comment

Choose a reason for hiding this comment

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

Thank you for working around the commit limitations! Let's try it out.

@stefannibrasil stefannibrasil merged commit 798db89 into main Apr 15, 2024
21 checks passed
@stefannibrasil stefannibrasil deleted the sb-dynamic-readme-updates branch April 15, 2024 17:00
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.

None yet

2 participants