We developed a CI system that runs via Github actions on self-hosted runners.
In order to prevent building unnecessarily, we incorporated a pre-build job that triggers a build only if the commit message has [trigger ci]
anywhere.
Now we are facing a slight annoyance: Even if the build job doesn't run, we still have a workflow run show up in the workflow runs list, as expected, but it has basically become a copy of the commit history and very hard to navigate or find which workflows did actually build.
Is there any way that I can delete a workflow run from the workflow runs list conditionally, within the workflow itself? This way, we can keep only the runs that did trigger a build, and delete the ones that skipped building.