Make workflow POSIX-safe and runner-friendly
Some checks failed
Deploy Hello Lambda CFT / deploy (push) Failing after 1s
Some checks failed
Deploy Hello Lambda CFT / deploy (push) Failing after 1s
This commit is contained in:
parent
205df8cbf1
commit
39fad689e8
1 changed files with 5 additions and 14 deletions
|
|
@ -20,25 +20,16 @@ jobs:
|
|||
- name: Ensure AWS CLI
|
||||
run: |
|
||||
if ! command -v aws >/dev/null 2>&1; then
|
||||
if command -v apk >/dev/null 2>&1; then
|
||||
apk add --no-cache aws-cli
|
||||
elif command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get update && apt-get install -y awscli
|
||||
else
|
||||
echo "No supported package manager found for awscli install"
|
||||
echo "aws CLI is not available on this runner. Install aws cli on the runner host/container and rerun."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
aws --version
|
||||
|
||||
- name: Check required AWS secrets
|
||||
run: |
|
||||
for v in AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION; do
|
||||
if [ -z "${!v}" ]; then
|
||||
echo "Missing required secret/env: $v"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
[ -n "$AWS_ACCESS_KEY_ID" ] || { echo "Missing required secret/env: AWS_ACCESS_KEY_ID"; exit 1; }
|
||||
[ -n "$AWS_SECRET_ACCESS_KEY" ] || { echo "Missing required secret/env: AWS_SECRET_ACCESS_KEY"; exit 1; }
|
||||
[ -n "$AWS_DEFAULT_REGION" ] || { echo "Missing required secret/env: AWS_DEFAULT_REGION (mapped from secret LOWER)"; exit 1; }
|
||||
if [ -z "${AWS_SESSION_TOKEN}" ]; then
|
||||
echo "AWS_SESSION_TOKEN is empty. Proceeding with long-lived access keys."
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue