-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use local aws credentials in local act
run
#409
Comments
I am sure you could pass them in via secrets function? Something like |
Issue is stale and will be closed in 14 days unless there is new activity |
Finagling @rahb3rt's answer a bit I got this working with act pull_request \
--env AWS_ACCESS_KEY_ID=$(aws configure get default.aws_access_key_id) \
--env AWS_SECRET_ACCESS_KEY=$(aws configure get default.aws_secret_access_key) \
--env AWS_SESSION_TOKEN=$(aws configure get default.aws_session_token Sources: |
for reference, what i ended up doing:
As you can see, I am encoding with base64 to avoid all escaping/newline issues. |
Alternative to @rdettai's solution, you can pass the credentials via act pull_request --env-file <(aws configure export-credentials --format env) |
Is it somehow possible to read the credentials from my local
~/.aws/
directory and use them in the workflow run?It is the same logic as used in e.g. docker by adding
-v $HOME/.aws:/root/.aws
to docker run command. Processes in the docker container now use the local credentials as base credentials for role assume.This way within the workflow the base credentials are the base credentials of my local aws configuration. Currently I need to copy paste Access Key Id, Secret Access Key and Session Token into a
.secrets
file foract
to pickup?Is there any way to pass e.g. custom docker commands?
The text was updated successfully, but these errors were encountered: