Open 46158n opened 4 months ago
The log looks strange.
2024-04-24T09:22:23.9027791Z ##[group]Run suzuki-shunsuke/tfaction/export-secrets@c56c96f8587d75ec918c79256b1f9c50361287fd
2024-04-24T09:22:23.9029200Z with:
2024-04-24T09:22:23.9100101Z secrets: {
"NEWRELIC_API_KEY_DEV": "***"
}
2024-04-24T09:22:24.0047333Z The list of secret names passed to the action: NEWRELIC_USER_KEY_DEV
I'm not sure where NEWRELIC_USER_KEY_DEV
(not NEWRELIC_API_KEY_DEV
) came from. 🤔
I'm getting the same issue I have set the config in tfaction.yaml
and I passed down the secret properly, It shows up in the logs but its not being set as an env vars.
tfaction version
v1.4.0
Overview
The secrets configured in tfaction.yaml are not being set as environment variables by export-secrets. However, when the same secrets configuration is set in tfaction-root.yaml, it works properly.
How to reproduce
tfaction-root.yaml
tfaction.yaml
GitHub Actions Workflow
I have created a workflow based on this example as a reference. I am using
secrets: inherit
to pass secrets to the reusable workflow.GitHub Actions' log
Expected behaviour
The log states:
export the secret NEWRELIC_API_KEY_DEV as the environment variable NEW_RELIC_API_KEY
.Below is the configuration of secrets written in tfaction-root.yaml:
tfaction-root.yaml
tfaction.yaml
Actual behaviour
The environment variable NEW_RELIC_API_KEY is not being set.
Important Factoids
This issue seems similar to https://github.com/suzuki-shunsuke/tfaction/issues/1564, where despite the log message in export-secrets stating
The list of secret names passed to the action: NEWRELIC_API_KEY_DEV
, the environment variable is not being set.After reviewing the code in the following files:
I couldn't find the part where it retrieves secrets from tfaction.yaml."
Note
No response