ITADN

Optimized workflow and added testing files for local testing

#58Pull RequestFrancescoMaca 创建于 2025-12-12
F
FrancescoMacacommented
Okay so I wrote a better way to publish zip files. Now rsync is used but a few changes must be made: 1 - Add a repository-level variable called `ZIP_NAME` that will be used to name the final `.zip` file rsynced on the vps. 2 - Add a organization-level variable called `ZIP_PATH` this will be the part of the path **ALL** resource packs will share (iirc currently is `/var/www/html/database.faithfulpack.net/packs`) #### Optional 1 - Change the action trigger to the desired value (currently set as `*`). You can add a step that checks if the `github.ref_name` aka the branch name starts with a number or `java-` to allow runs on versioned branches only. ### Suggestions - [x] Change the `SSH` secret to `PRIVATE_KEY` or something more understandable as well as removing it from the repository-level to organization-level. This way you don't need to define it in all the repositories and can be changed faster if needed. - Check if the `Install rsync` step is needed. The testing app I use does not include it in the docker image, thus I have to install it. I think a fix would be to add the prebuilt step `up9cloud/action-rsync@x.x.x` and see if its faster than installing it. ### How to test? Use **`act`** to test github actions on device. This will require Docker and a few hundre mbs of space. Once you installed `act` just run it with: ```act --secret-file .act-secrets --var-file .act-vars``` Or if you are on a M-Series MacBook: ```act --container-architecture linux/amd64 --secret-file .act-secrets.local --var-file .act-vars.local``` Before running it you need to create those two files `.act-secrets.local` and `.act-vars.local`. Simply copy the two `.act-*` templates and change them with your own data.
合并状态:未合并 1 条评论