Skip to content

workflows: Add workflow for syncing module with upstream#266

Open
faxe1008 wants to merge 1 commit into
zephyrproject-rtos:mainfrom
faxe1008:add_sync_jobs
Open

workflows: Add workflow for syncing module with upstream#266
faxe1008 wants to merge 1 commit into
zephyrproject-rtos:mainfrom
faxe1008:add_sync_jobs

Conversation

@faxe1008

Copy link
Copy Markdown

Since some modules owned by the Zephyr organization are not created as a Github fork maintaining them as a complete mirror requires manual pushing. To fix this add a reusable workflow that can be configured for each module to sync a specific branch in our version with upstream. Also adds a sample usage of said workflow for the LVGL module.

target_repository: "zephyrproject-rtos/lvgl"
target_branch: "master"
secrets:
PAT_TOKEN: ${{ secrets.ZB_REPO_SYNC_GITHUB_TOKEN }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@stephanosio is this a good name for the token?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Related: Do we envision one token with write permissions to all the module repos, or a dedicated token per repo? If dedicated, this should probably be named with the module name included.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Related: Do we envision one token with write permissions to all the module repos, or a dedicated token per repo? If dedicated, this should probably be named with the module name included.

There will be one token for all automated repository sync workflows -- there is not much point in having dedicated token per repo when any workflow in this repository can access all repository secrets.

@aescolar aescolar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From my POV this is still a good solution overall.
For the exact details of the implementation, I think it is best if @stephanosio (i.e. somebody who actually takes care of the infrastructure) decides on.

@fabiobaltieri

fabiobaltieri commented Sep 2, 2025

Copy link
Copy Markdown
Member

@stephanosio any updates? this came up for another repo (hal_tdk) on discord, the problem is that people are sending repos out of sync using the dreaded github merge commits, it'd be nice to get to the bottom of this

Comment thread .github/workflows/sync_module/sync-module.yml Outdated

@stephanosio stephanosio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@faxe1008 If you prefer, I could also make the necessary changes myself and merge this PR to expedite the process a bit (there will likely be more changes necessary as I test this).

Comment thread .github/workflows/sync_module/lvgl.yml
Comment thread .github/workflows/sync_module/sync-module.yml
@wearyzen

wearyzen commented Sep 3, 2025

Copy link
Copy Markdown

hal_ethos and maybe cmsis_6 in the future would really benefit from this in the future

@faxe1008

faxe1008 commented Sep 3, 2025

Copy link
Copy Markdown
Author

@stephanosio I will incorporate the changes you suggested and then you can take it from there.

Since some modules owned by the Zephyr organization are not created as a
Github fork maintaining them as a complete mirror requires manual
pushing. To fix this add a reusable workflow that can be configured for
each module to sync a specific branch in our version with upstream.
Also adds a sample usage of said workflow for the LVGL module.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
@faxe1008

faxe1008 commented Sep 4, 2025

Copy link
Copy Markdown
Author

@stephanosio applied your suggestions, feel free to take over :^)

@faxe1008

faxe1008 commented Oct 6, 2025

Copy link
Copy Markdown
Author

@stephanosio did you find some time to check this one out? I know there were some concerns in regards to token scoped access, right?

@fabiobaltieri

Copy link
Copy Markdown
Member

@stephanosio ping

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.

6 participants