-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add exclude option to skip sync keys * chore: save * chore: save * chore: add colors to log messages * chore: add configuration to show or hide secret values
- Loading branch information
Showing
8 changed files
with
297 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
import core from "@actions/core"; | ||
import Action from "./src/action/Action.js"; | ||
|
||
async function run() { | ||
try { | ||
const dryRun = core.getInput("dry_run") === "true"; | ||
const getAction = () => { | ||
return new Action( | ||
core.getInput("aws_access_key_id"), | ||
core.getInput("aws_secret_access_key"), | ||
core.getInput("aws_region"), | ||
core.getInput("secret_name"), | ||
core.getInput("json_file_path"), | ||
core.getInput("exclude"), | ||
core.getBooleanInput("show_values"), | ||
); | ||
}; | ||
|
||
const action = new Action( | ||
core.getInput("aws_access_key_id"), | ||
core.getInput("aws_secret_access_key"), | ||
core.getInput("aws_region"), | ||
core.getInput("secret_name"), | ||
core.getInput("json_file_path"), | ||
); | ||
const run = async () => { | ||
try { | ||
const dryRun = core.getBooleanInput("dry_run"); | ||
|
||
const changeSet = await action.run(); | ||
const changeSet = await getAction().run(); | ||
|
||
for (const desc of changeSet.changeDesc()) { | ||
core.info(desc); | ||
} | ||
|
||
if (!dryRun) { | ||
await changeSet.apply(); | ||
core.info("Secrets has been synced!!"); | ||
} | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} | ||
} | ||
}; | ||
|
||
run(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.