Cool! On Thu, Oct 8, 2020 at 6:37 PM Ash Berlin-Taylor <[email protected]> wrote:
> Just a note that I've _finally_ found a way to tidy up the list of > workflows we have in https://github.com/apache/airflow/actions and that > now shows only the "active"/used workflows we have. > > To delete a workflow from that list you have to delete the yaml file, > which we had already done, and also delete all the old workflow runs too. > Which did with for loops and jq :) > > This will print the workflow ID and the name. Cross check this in the UI > with which ones are still running > gh api repos/:owner/:repo/actions/workflows --paginate | /usr/sbin/jq > '.workflows[] | "\(.id) \(.name)" > > For everyone that isn't running, go and delete all the old runs: > > for run in $(gh api > repos/:owner/:repo/actions/workflows/<workflow_id>/runs --paginate | jq > '.workflow_runs[].id') ;do gh api -X DELETE > repos/:owner/:repo/actions/runs/$run | cat; done > > (Only committers can do this last step I'd hope) > > Enojy! > -- Jarek Potiuk Polidea <https://www.polidea.com/> | Principal Software Engineer M: +48 660 796 129 <+48660796129> [image: Polidea] <https://www.polidea.com/>
