Skip to content

Conversation

@miabbott
Copy link
Contributor

This introduces a GitHub workflow to periodically run cargo xtask update-generated in order to keep the docs up-to-date with the latest changes. It will create a PR if changes are detected.

Signed-off-by: Micah Abbott [email protected]

This introduces a GitHub workflow to periodically run `cargo xtask
update-generated` in order to keep the docs up-to-date with the
latest changes. It will create a PR if changes are detected.

Signed-off-by: Micah Abbott <[email protected]>
@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@miabbott
Copy link
Contributor Author

I put this together with some help from Gemini.

I don't know if auto-generated PRs are desired in this repo, so feel free to close it if not.

Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Thanks!

run: cargo xtask update-generated
shell: bash

- name: 'Create Pull Request'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on my read of how the action behaves, it will silently exit if there are no changes detected - https://github.com/peter-evans/create-pull-request?tab=readme-ov-file#action-behaviour

How the action behaves:

  • If there are changes (i.e. a diff exists with the checked-out base branch), the changes will be pushed to a new branch and a pull request created.
  • If there are no changes (i.e. no diff exists with the checked-out base branch), no pull request will be created and the action exits silently.

When I tested this in my fork, it correctly created a PR that looked like #1385

Hmm...I should apply those changes to my main branch and see if the action just no-ops. Will report back here with results!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ohh hmm, then maybe some of these FCOS actions have been unnecessarily doing a diff? Either way thanks so much for testing this out!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like my understanding was correct; after applying the generated changes to my main branch, the next time I ran the action there was no PR generated.

https://github.com/miabbott/bootc/actions/runs/15917569924/job/44897979972

Ohh hmm, then maybe some of these FCOS actions have been unnecessarily doing a diff?

In the example you linked, I think you could simplify the "Check if there are new commits" step to just do a git submodule update. If there was a new submodule commit, the PR action would generate the PR otherwise it would no-op.

Comment on lines +5 to +8
on:
workflow_dispatch:
schedule:
- cron: '15 3 * * *'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another option would be to have this fire on every push to main

on:
  push:
    branches:
      - main

Copy link
Collaborator

Choose a reason for hiding this comment

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

That said, we could also just do this as a check on PRs and require the submitter to do it...

But yeah since you already wrote it this way I'm fine to run with it for now.

@cgwalters cgwalters merged commit 3c083cf into bootc-dev:main Jun 27, 2025
34 checks passed
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.

2 participants