Comments (2)
Hi @nicolaevladescu , I don't know the order of precedence that GitHub Actions follows for setting env variables in Docker actions (I can't find it documented anywhere), but it appears that env vars set in the workflow's environment override values in the action's env
settings based on what you are seeing. It would be a good question for you to ask in the GitHub Actions forum.
Do you see the same behavior for any kind of environment variable, not just ones set by this action? For example, does "bar" take precedence over both "foo" and "baz" below?
jobs:
job1:
env:
AWS_ACCESS_KEY_ID: "foo"
steps:
- run: |
echo "::set-env name=AWS_ACCESS_KEY_ID::bar"
- uses: <<your action>>
with:
aws_key: "baz"
With respect to resetting the environment variables, individual GitHub Action jobs each have a fresh environment, so you can do:
jobs:
job1:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
job2:
runs-on: ubuntu-latest
steps:
- uses: <<your action>>
with:
aws_key: ${{ secrets.ANOTHER_AWS_ACCESS_KEY_ID }}
aws_secret: ${{ secrets.ANOTHER_AWS_SECRET_ACCESS_KEY }}
aws_region: us-east-2
from configure-aws-credentials.
Hi.
Thank you for the suggestions, yeah it seems it's out of the control of this action. I will try to find out the precedence from GitHub.
Thanks for the feedback!
from configure-aws-credentials.
Related Issues (20)
- Missing changelog for v4.0.2 HOT 1
- How to run AWS VRK client certificates on elastic beanstalk env using github action. HOT 2
- "Error: EACCES: permission denied, open" when running on non-root self-hosted runners HOT 3
- Allow unmasking of `AWS_ACCESS_KEY_ID` HOT 1
- OIDC not working with `jobs.<job_id>.environment` HOT 3
- Update node version HOT 3
- Incorrect sts endpoint when using region cn-north-1 HOT 1
- short issue description HOT 7
- AWS SSO Support with aws-actions/configure-aws-credentials HOT 4
- Proxy support does not work when moving from v2 to v4 HOT 2
- Provide ARN of authenticated principal as output HOT 1
- Add option to specify a custom STS endpoint HOT 1
- Credentials could not be loaded in self x64 windows hosted for aws-actions/configure-aws-credentials HOT 4
- OIDC: Can't assume role containing "github" HOT 2
- unset-current-credentials does not fully unset AWS_* env variables HOT 2
- configure-aws-credentials@v4 fails to create ~/.aws/credentials file HOT 6
- Using organization environment variables for `role-to-assume` is empty HOT 2
- Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers HOT 6
- To avoid using long-term AWS credentials, please update your workflows to authenticate using OpenID Connect. HOT 7
- Node.js 16 actions are deprecated HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configure-aws-credentials.