Skip to content

Add workflow to automatically update other repos - #231

Merged
CajunAvenger merged 7 commits into
MagicSetEditorPacks:mainfrom
G-e-n-e-v-e-n-s-i-S:installer-pack-workflow
Jul 11, 2026
Merged

Add workflow to automatically update other repos#231
CajunAvenger merged 7 commits into
MagicSetEditorPacks:mainfrom
G-e-n-e-v-e-n-s-i-S:installer-pack-workflow

Conversation

@G-e-n-e-v-e-n-s-i-S

@G-e-n-e-v-e-n-s-i-S G-e-n-e-v-e-n-s-i-S commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Sign in to GitHub with the MagicSetEditorPacks account
  • Go to Settings > Developer settings > Personal access tokens > Fine-grained tokens
  • Click Generate new token
  • Configure it like this:
    • Name: Syncing Actions
    • Expiration: No expiration
    • Repository access: Only select repositories
      then select: MagicSetEditorPacks/Installer-Pack
      and: MagicSetEditorPacks/M15-Magic-Pack
      and: MagicSetEditorPacks/Basic-M15-Magic-Pack
    • Permissions: Add permission: Contents
      then change access to read and write
    • Click Generate token and copy it somewhere immediately — GitHub won't show it again

Second, create a Secret from the Personal Access Token:

  • Go to MagicSetEditorPacks/Full-Magic-Pack
  • Settings > Secrets and variables > Actions
  • Click New repository secret
  • Name it exactly: SYNCING_ACTIONS_TOKEN
  • Paste the token as the secret
  • Click Add secret

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.

@G-e-n-e-v-e-n-s-i-S G-e-n-e-v-e-n-s-i-S changed the title Add workflow to automatically update installers Add workflow to automatically update other repos Jul 9, 2026
@G-e-n-e-v-e-n-s-i-S
G-e-n-e-v-e-n-s-i-S marked this pull request as ready for review July 9, 2026 15:26
@CajunAvenger

Copy link
Copy Markdown
Collaborator

how does the sync handle a new Showcase frame that gets added to M15 but not Basic?

@G-e-n-e-v-e-n-s-i-S

Copy link
Copy Markdown
Collaborator Author

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

@CajunAvenger

Copy link
Copy Markdown
Collaborator

is it able to read the package name? magic-m15* can safely go into m15 and *.mse-include can safely go everywhere

@G-e-n-e-v-e-n-s-i-S

Copy link
Copy Markdown
Collaborator Author

done

@CajunAvenger

Copy link
Copy Markdown
Collaborator

api token set up

@CajunAvenger

CajunAvenger commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

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.

@G-e-n-e-v-e-n-s-i-S

G-e-n-e-v-e-n-s-i-S commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@CajunAvenger
CajunAvenger merged commit bcdf419 into MagicSetEditorPacks:main Jul 11, 2026
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