Closed daba-sharhan closed 2 years ago
@daba-sharhan where is your action running? Do you use self hosted runners or are you using GitHub-hosted runners? How are you authenticating with AWS (I don't see any credentials being passed). You can refer README for an example on how to pass AWS credentials + the naming convention to expect/follow.
Also, if your secret is called test/secret
and value is {"token": "foo"}
and parse-json: true
, it will be available as TEST_SECRET_TOKEN
environment variable, with value foo
. You need to try something like echo $TEST_SECRET_TOKEN
and not echo "value is ${token}"
. However, you may just see something like ***
in the GitHub Action logs since GitHub will mask your secret value in the logs to keep it secure.
@abhilash1in I didn't know I had to do double authentication with AWS. I already had an action that authenticates with AWS and so I omitted passing any credentials in the
with
block of your Git Action. I just added it and the secrets are passed to the environment variables. But that means double credentials passing?? Thanks for the help
@abhilash1in The other thing is, how am I passing the secret to my let's say
--build-arg
. Is it going to be$TEST_SECRET_TOKEN
or${TEST_SECRET_TOKEN}
@daba-sharhan I just released a new version v2.0.0
which supports the native AWS way to authenticate. Using this, you shouldn't have the double authentication issue. Can you please try it out and let me know how it goes?
@abhilash1in Let me give it a spin and get back. Kudos to you for the quick update and release
@abhilash1in Hey @abhilash1in. Your new fix works like magic. I no longer use a separate action to authenticate with AWS. Yours is now sufficient with an all-in-one action + aws authentication. Thanks for the cool work.
@abhilash1in how do I pass the environment variable? I am trying to call it using ${{ env.variable_name }} but it doesn't populate
@daba-sharhan that’s good to hear! Thank you. Closing this issue.
@noelatebid Please create a new issue with more details on what you’re trying to do and what you’ve done so far. I’m happy to help.
I am trying to inject
key/values
from aws secret manager with a secret nametest/secret
. I realize the values are not being injected into the environment variables. This is my sample code to retrieve atoken
value