Sharing credentials for subsequent jobs #700
-
I have two jobs that require aws credentials, currently having this step in both jobs to get auth'd. Is there a way to just obtain the credentials for once and share the credentials like an artifact for dependent jobs later? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Here's a helpful article on a couple options you have to persist GitHub Action data. I'm going to convert this to a discussion so that further discussion can take place over examples and what the best strategy might be |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
-
I don't think you would store credentials as an artifact. See the documentation on the In the example they give, the credentials are referenced only from within the same job's steps, like: You should be able to set them as outputs of the job like this example is doing with the Docker credentials: The subsequent jobs that depend on the credentials can use the What I am finding is that it's probably better to just assume the role you need using OIDC in each job that needs it rather than pass credentials around, because you still need to use Additionally if sensitive values are passed, they should be masked, which the AWS actions documentation does not show: |
Beta Was this translation helpful? Give feedback.
Here's a helpful article on a couple options you have to persist GitHub Action data.
I'm going to convert this to a discussion so that further discussion can take place over examples and what the best strategy might be