Hello everyone, thank you very much for accessing this content, if you are here, you also use GitHub Actions and, of course, when you write an action sometimes that action fails, the action history grows and you need to remove it one by one of that history, it’s a boring task and you need to do it. What could facilitate this task? Okay, come on, we can make this task easier with PWSH7.
I wrote some Actions to automate tasks on my raspberry , my raspberry now it’s my Self Hosted Runner, In GitHub Actions you be able to use runners on plataform MacOS,Windows,Linux or Self Hosted in this particular mode, you need to management everything about admin tasks.
Before you need to have some things:
- Create a token on GitHub for connect on RestAPI (if you won’t provide this token you can’t interact with your GitHub Actions)
- PowerShell 7
- Secrests Managment(not mandatory but it’s cool to know)
Steps for create a token:
Now I show you the code 😃:It’s very simple after you had your personal access token, you need to know wich repository you want to make cleanup and that’s it 😃:
PowerShell Script:
That’s it. I really wish you appreciate this content, if you liked that content share with all. See you at next opportunity.
Top comments (0)