Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mask TOML secrets action #154

Closed
wants to merge 3 commits into from
Closed

Conversation

lukaszcl
Copy link
Contributor

This introduces a GitHub action designed to mask TOML secrets within E2E test configs. This action has been successfully utilized in Mercury project over the past few months. I'm migrating it here for reusability.

@Tofel
Copy link
Contributor

Tofel commented Feb 19, 2024

@lukaszcl can we have a short readme.md that explains what it does? not everyone reads python

@lukaszcl
Copy link
Contributor Author

@Tofel I added README. Also, the info how to use action is in the action.yml

@lukaszcl lukaszcl requested a review from Tofel February 19, 2024 16:12
To use this action in your workflow, follow the steps below:

1. Ensure you have a Base64-encoded TOML configuration string that you wish to mask. The keys for any secrets in the TOML should end with `_secret`.
2. Add a step in your GitHub Actions workflow to use this action. Do it **before** any other action related to the TOML
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe give more examples?

  • if that toml is user input, when should this action run?
  • if that toml is generated in the workflow, when should this action run?

Copy link
Contributor Author

@lukaszcl lukaszcl Feb 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tofel

if that toml is user input, when should this action run?

the action should run before you use TOML values. This is in the readme. Please say how would you want to update this text :)

if that toml is generated in the workflow, when should this action run?

This action does not care how you generate base64-encoded toml. You just have to pass it to the action if you want to mask keys with _secret suffix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant: add it to the readme!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to see specific examples for these 2 cases, readme is too abstract for me, I wouldn't be sure how to use that acitons in these 2 cases

@lukaszcl lukaszcl closed this Feb 19, 2024
@lukaszcl
Copy link
Contributor Author

This action will stay in https://github.com/smartcontractkit/mercury-pipeline repo until we are sure that we can use it across other repos.

@lukaszcl lukaszcl deleted the add-mask-toml-values-action branch February 19, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants