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

Remove prefix #294

Open
ThorHen opened this issue Feb 27, 2024 · 1 comment
Open

Remove prefix #294

ThorHen opened this issue Feb 27, 2024 · 1 comment

Comments

@ThorHen
Copy link

ThorHen commented Feb 27, 2024

Hi,

Not entirely sure whether this is already supported or not.

Is it in some way possible to remove a specified prefix from the secret names, before adding them as environment variables?

Kind of the inverse of the prefix option specified in the readme.

Really neat action!

Example

GitHub Secrets

MY_PREFIXED_SECRET_1 = ABC
MY_PREFIXED_SECRET_2 = DEF

YML

steps:
- uses: actions/checkout@v3
- uses: oNaiPs/secrets-to-env-action@v1
  with:
    secrets: ${{ toJSON(secrets) }}
    include: my_prefixed_* # Should include both MY_PREFIXED_SECRET_1 and MY_PREFIXED_SECRET_2 
    remove_prefix: my_prefixed_

- run: echo "Value of SECRET_1: $SECRET_1"
@JackMBurch
Copy link

Yeah, this would be helpful

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

No branches or pull requests

2 participants