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

Automate cargo-generate branch updates #263

Merged
merged 18 commits into from
Aug 15, 2024

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Aug 12, 2024

Closes #129.

This adds cargo-generate.yaml, a workflow that will automatically merge new changes from main to the cargo-generate branch.

This will require someone with write access to this repo to create a personal access token with write permissions for "Contents" and "Workflows". I cannot use my own, since I don't have write access. I recommend creating a scoped token that can only write to this specific repository.

This workflow will automatically create an issue on a merge conflict. For an example, see https://github.com/BD103/bevy_quickstart/issues/4.

@BD103 BD103 marked this pull request as ready for review August 12, 2024 18:24
Thanks, Jan!

Co-authored-by: Jan Hohenheim <[email protected]>
Copy link
Member

@janhohenheim janhohenheim left a comment

Choose a reason for hiding this comment

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

Appreciate all the comments in the workflow :)

.github/workflows/cargo-generate.yaml Show resolved Hide resolved
@BD103
Copy link
Member Author

BD103 commented Aug 12, 2024

This is what my token looks like:

image

Save value as CARGO_GENERATE_PAT under this repository's actions secrets:

image

Copy link
Collaborator

@benfrankel benfrankel left a comment

Choose a reason for hiding this comment

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

The double quotes / curly braces are technically not required here, but it's good form to use them anyways to avoid subtle bugs in situations where they are required, or if assumptions are invalidated in the future.

PR seems reasonable to me otherwise. We can test it out in practice and fix issues if any arise.

.github/workflows/cargo-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/cargo-generate.yaml Outdated Show resolved Hide resolved
.github/workflows/cargo-generate.yaml Outdated Show resolved Hide resolved
Copy link
Member

@janhohenheim janhohenheim left a comment

Choose a reason for hiding this comment

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

LGTM other than @benfrankel's comments

@janhohenheim janhohenheim merged commit d9279be into TheBevyFlock:main Aug 15, 2024
4 checks passed
@BD103 BD103 deleted the automate-cargo-generate branch August 15, 2024 20:54
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.

Automatically merge main into cargo-generate when a PR is merged
3 participants