Skip to content
/ mc_ci Public

Repository to sync the workflows of all my mods ๐Ÿš€

License

Notifications You must be signed in to change notification settings

ate47/mc_ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Logo

Minecraft CI ๐Ÿš€

Project to test/sync ci to all my mods

Test project on CurseForge

Minecraft CI

I'm a Powershell user, so my scripts are with Powershell.

project.json schema

Config file to store the projects.

{
  "projects": [
    {
      "id": "user/repository",
      "branches": ["branch1", "branch2"]
    }
  ]
}

Scripts

  • list_project.ps1: Print a list of the projects.
  • update_project.ps1 -Id "user/repo" (-Editor "text-editor-cmd"): Create or update a project, will open a file with an editor to select which branch to sync.
  • delete_project.ps1 -Id "user/repo": Delete a project.
  • get_project.ps1 -Id "user/repo": Get a project.
  • update_sync_commit.ps1 (-Editor "text-editor-cmd") (-Message "commit message"): Set the sync commit message.
  • init.ps1: Init the project.json file, done by default with the other scripts.
  • sync.ps1: Sync the projects. See Sync process

Sync process

all files in the common.github directory will be sync into the branches/projects with one commit with the message described in sync_commit_message.txt.

Using workflow

By default it should be used using the .github/workflows/sync.yml workflow.

for forks, 2 secrets are required to config the account to push the sync commits, this account should have at least the repository and workflows permissions on the project's repositories.

  • GH_PAT: Github token/password.
  • GH_USERNAME: Github username.

You can run the command to sync by using this command:

Using command line

scripts/sync.ps1 `
    -IKnowWhatImDoing `
    -File "config/project.json"`
    -GitUser 'username for the sync commit'`
    -GitMail 'mail for the sync commit'`
    -GitPushUser 'Github username'`
    -GitPassword 'Github password or token'

The names are pretty much self explaining, but:

  • -IKnowWhatImDoing: Mandadory, admit it'll be your fault.
  • -File: project.json file, by default "config/project.json".
  • -GitUser: username for the sync commit.
  • -GitMail: mail for the sync commit.
  • -GitPushUser: Github username to push the sync commit.
  • -GitPassword: Github password or token to push the sync commit.

About

Repository to sync the workflows of all my mods ๐Ÿš€

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks