MinicraftPlus / minicraft-plus-revived

Minicraft+, an extension of Notch's original minicraft project, with tons more features.
GNU General Public License v3.0
466 stars 93 forks source link

Rate limit for autobuild.yml #611

Closed BenCheung0422 closed 8 months ago

BenCheung0422 commented 8 months ago

Now this workflow should now be able to run only when there is no successful or running auto build job since the latest commit not committed by Actions. This runs every time a pull request closed, manually or every 4 hours. A check is done before running. Within the check, it first fetches the commit datetime of the latest commit not committed by Actions (number of items: 30); then it searches for the presence of any successful or running or pending workflow runs (number of items: 30); it sends the boolean value to the environment about to continue the job or not, it is true if the presence is false; if the sent value is false, it aborts (cancels the workflow run). The build job requires conditions to run first, so that it will run only when conditions are successful.

Litorom commented 8 months ago

Tbh idk how to test this without merging. I’ll revert the merge if it doesn’t work

BenCheung0422 commented 7 months ago

After looking on the GitHub docs, actually shell: bash is needed for the configs. I was assuming the commands were running with a bash shell. Anyway, this part is now not needed anymore.