Skip to content

Utility to update parameters of GitHub Actions workflows

License

Notifications You must be signed in to change notification settings

becojo/gha-patch-param

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gha-patch-param

Utility to make format preserving updates to GitHub Actions workflows so that actions that install tooling can be updated to use the latest versions.

Example

Given a workflow that installs an old version of Terraform:

steps:
- uses: hashicorp/setup-terraform@v1
  with:
    terraform_version: 1.1.2

gha-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): y

Note: A GitHub token is required in the environment variable GITHUB_TOKEN in order to use the GitHub GraphQL API to fetch the latest releases.

About

Utility to update parameters of GitHub Actions workflows

Topics

Resources

License

Stars

Watchers

Forks

Languages