【发布时间】:2020-09-06 10:58:19
【问题描述】:
我想在 Github 操作工作流中运行 aws configure 来设置部署管道。但是,与文档 found here 相比,设置环境变量似乎不起作用。
工作示例:
部署: 名称:测试 AWS cli 运行:ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
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-west-2
- name: Copy files to S3 with the AWS CLI
run: |
which aws
aws configure
结果
EOF when reading a line
AWS Access Key ID [********************]:
##[error]Process completed with exit code 255.
在本地复制时,这是因为它提示输入来自 aws-cli 的访问密钥 ID。
为什么它会提示我,根据文档,它应该选择环境变量并相应地设置它?
已在 Github 中使用上面引用的正确命名设置了秘密。
【问题讨论】:
标签: amazon-web-services aws-cli github-actions