Add workflow to automatically update other repos - #231
Conversation
|
how does the sync handle a new Showcase frame that gets added to M15 but not Basic? |
|
the sync doesn't currently add anything. you have to manually add it to M15 yourself. once it's added, it will update it if it gets changed. (the actual work done is written in python, it starts on line 53) we could, for example, add a comment to the style files to specify in which packs a stylesheet must go, and have the sync read that and add it automatically |
|
is it able to read the package name? magic-m15* can safely go into m15 and *.mse-include can safely go everywhere |
|
done |
|
api token set up |
|
the two smaller packs have been synced to Full Pack. Once Installer Pack is ready for this to start happening, we can merge this one; ideally we don't merge other changes to main until after this one is applied. |
|
Yeah, the idea was that we merge this in main, then we merge everything else in develop, then we merge develop in main, and that will automatically initialize the Installer Pack, since basically every template gets changed in 2.6.0 because of this PR: #202 Which means we don't need to do anything special with the Installer Pack now, it's already ready. When I said that this doesn't add anything, that's actually only true for the M15 and Basic pack. It WILL add installers to the Installer Pack if they don't already exist. |
This PR should be merged directly into main, just before we merge the 2.6.0 update.
It adds a job that will be run automatically on every push to Full-Magic-Pack/main. The job will check which packages in the data folder have been modified by the push, rebuild their installer, update the installer list, then push those changes to the Installer-Pack repo. It will also mirror any change made to these packages to the Basic-M15-Magic-Pack and M15-Magic-Pack if they also contain the package.
(This should probably be tested with a small push before we merge 2.6.0.)
Since this is modifying repos other than the one it is in, it needs a special access permission. Here is how to set it up. It should be done before this PR is merged.
First, create a Personal Access Token:
then select: MagicSetEditorPacks/Installer-Pack
and: MagicSetEditorPacks/M15-Magic-Pack
and: MagicSetEditorPacks/Basic-M15-Magic-Pack
then change access to read and write
Second, create a Secret from the Personal Access Token:
You can see on lines 25, 32, and 39 of the yml file that i grant this SYNCING_ACTIONS_TOKEN to the workflow, which means it will have read/write access to these 3 repos.