Skip to content

Just-Some-Plugins/AutoRepo

Repository files navigation

AutoRepo Parse and Process Trigger

This script is designed to get around the limitation in GitHub building where an action in one repository cannot be triggered by another repository. This limitation combined with the inability to easily add actions to a contribution-focused fork of a plugin (you would have to constantly remove them pre-PR), makes it difficult to auto-build your fork for tester's to use.

These Actions are ran from a comment on an issue, created by AutoRepo-worker, and they do the actual building of the triggering repositories, and subsequent packaging and publishing of the built plugin to the AutoRepo-Web repository, which is a private shell repo.
The shell has no actual code, it is only a destination for the build script to commit to and is the repo for Cloudflare Pages website, so when the build script pushes to it, Cloudflare will pull and publish those changes to the website.

Tip

For Usage, see AutoRepo-worker.

Build Troubleshooting

Builds are ran on ubuntu-latest, with net9.0.* installed, with all submodules, and all projects restored, directed at a solution file in the root of the repository.

If your build outputs a folder of the same name as your project with a .zip in it (in the same directory as the .dll), that will be used as the package instead of one being compressed by the build script.

If you are having trouble with the build, it is suggested that you try to run AutoRepo locally to see if you can reproduce the error and/or debug it.

CS0246 "missing a using directive"

Your project, or one of its dependencies, is not using *nix-compatible DalamudLibPath values.
$(HOME)/.xlcore/dalamud/Hooks/dev/ or $(DALAMUD_HOME)/ is expected.

Here are some examples of how you can handle this: WrathCombo, ECommons, WhoList

The type or namespace name 'Dalamud' could not be found
(are you missing a using directive or an assembly reference?)

NETSDK1073 "WindowsForms was not recognized"

Your plugin, or one of its dependencies, is targeting net*-windows but does not have <EnableWindowsTargeting>true</EnableWindowsTargeting> in a PropertyGroup.
EnableWindowsTargeting is required to target net*-windows in a project, as the build is run on ubuntu-latest and does not have the Windows SDK.

/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution. targets
The FrameworkReference 'Microsoft.WindowsDesktop.App.WindowsForms' was not recognized

Setup

Repository Secrets

These Actions Variables are required to be present on AutoRepo, the repository that the worker is triggering builds on.

Setup under Secrets and Variables > Actions > Secrets in the repository settings.

Secret Name Value PAT Link
BOT_READ_REPOS_TOKEN Fine-Grained PAT with Repository: Variables: Read, on AutoRepo ->
BOT_INVITE_ACCEPT_TOKEN Classic PAT with the full repo scope ->
BOT_WRITE_REPOS_TOKEN Fine-Grained PAT with Repository: Content: Read and Write, on AutoRepo-Web ->
DISCORD_HOOK Discord hook to JSP#autorepo-triggers

Local Running

Local running of Actions is vital for development and testing, and the only real way to do this is via nektos/act.

It's sort of a hassle to set up, but that's made a LOT easier if done through the GitHub Local Actions VS Code Extension. Just install that, and go through the Component Setup process (if you need help, go here), run the action once to get the prompts to finish your setup, and you'll be ready to run the actions locally via the .idea/runConfigurations script (once you make the .secrets file below, that is).

.secrets

payload.json has been provided for local running with act, but you'll still need the secrets.

Make a new file called .secrets, and in it you need to add the Repository Secrets from above, in the following format:

BOT_INVITE_ACCEPT_TOKEN=ghp_.......
BOT_READ_REPOS_TOKEN=github_pat_.......
BOT_WRITE_REPOS_TOKEN=github_pat_.......
DISCORD_HOOK=https://discord.com/api/webhooks/.......

(replacing everything after the = with the actual secret values)


AutoRepo: worker-triggered github actions to build plugins.
Copyright (C) 2025  Ethan Henderson (zbee) <[email protected]>

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as published
 by the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with this program. If not, see <https://www.gnu.org/licenses/>. 

About

GitHub Actions triggered by AutoRepo-Worker to build and publish the Plugins (to AutoRepo-Web).

Resources

License

Stars

Watchers

Forks

Languages