Automatically rotate github tokens (client id/PAT)

Cross post from: terraform - How to rotate Github API secrets automatically? - Stack Overflow

So according to this question, the api to manage PATs and Client Secrets is dead. What I’m trying to do is have the client secrets stored in my Github Actions Secrets rotated automatically.

One secret stored in Action Secrets is a Cloud Service Provider (CSP, ex: Azure) Client Secret. Its for terraform to manage the CSP resources. The other is a GH PAT/Client ID to save the Action Secrets when they are rotated by Terraform in an Action Cron.

As I see it, right now, I can either set super long (like three month) PAT/Client Secrets that get rotated manually on the Web Settings, or I can abandon using github Actions with Terraform and use something like Azure DevOps pipelines.

What is the process for automatically rotating github tokens (client id/PAT)?