If you want to commit changes to a GitHub repository by a script running on GitHub Actions you need a personal access token (PAT).
In this video I show you how to create a PAT and add it as a secret to your repository. After that a script can be run, where changes to the repository can be committed and pushed.
I setup a blog on GitHub for you.
Have a look at my offer on Fiverr: https://www.fiverr.com/share/7Yo4Rk