Utility to make format preserving updates to GitHub Actions workflows so that actions that install tooling can be updated to use the latest versions.
Given a workflow that installs an old version of Terraform:
steps:
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.1.2gha-patch-param can fetch the latest version of Terraform and update the workflow:
$ uvx https://github.com/becojo/gha-patch-param.git update path/to/repo
INFO: Actions to be patched:
INFO: hashicorp/setup-terraform in workflows:
INFO: .github/workflows/test.yml
Proceed to fetch latest values? (y/N): y
INFO: In workflow .github/workflows/test.yml:
INFO: terraform_version: 1.1.2 -> 1.14.3
Do you want to write the above changes? (y/N): yNote: A GitHub token is required in the environment variable GITHUB_TOKEN in order to use the GitHub GraphQL API to fetch the latest releases.