Replace secret key names in GitHub Actions
Recipe ID
org.openrewrite.github.ReplaceSecretKeysArtifact
org.openrewrite.recipe:rewrite-github-actionsReplace key names used for secrets in GitHub Actions workflow files.
Usage
You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.github.ReplaceSecretKeys --recipe-option "oldKeyName=ossrh_username" --recipe-option "newKeyName=sonatype_username"If the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite.recipe:rewrite-github-actions:3.28.0Options
| Name | Type | Description |
|---|---|---|
oldKeyNamerequired | String | The name of the key to be replaced e.g. ossrh_username |
newKeyNamerequired | String | The new key name to use e.g. sonatype_username |
fileMatcher | String | Optional file path matcher e.g. .github/workflows/*.{yml,yaml} |
Data tables
Structured output this recipe can produce.
- Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats