File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 2323 id : pr
2424 run : echo "::set-output name=id::$(<pr/pr-id.txt)"
2525 shell : bash
26+ - name : Install AWS CLI
27+ run : |
28+ $workdir="2.22.35"
29+ mkdir -p "$workdir"
30+ cd "$workdir"
31+ curl -I -sL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip"
32+ unzip awscliv2.zip
33+ aws_path=$(which aws || true)
34+ [[ -n "$aws_path" ]] && msg_log "aws_path = ${aws_path}"
35+ if [[ "$aws_path" =~ ^qemu-aarch64.* ]]; then
36+ msg_error "Failed to install AWS CLI - Make sure AWS_CLI_ARCH is set properly, current value is ${provided_arch}"
37+ elif [[ "$aws_path" =~ ^.*aws.*not.*found || -z "$aws_path" ]]; then
38+ # Fresh install
39+ ./aws/install --bin-dir "$_BINDIR" --install-dir "${_INSTALLROOTDIR}/aws-cli"
40+ else
41+ # Update
42+ ./aws/install --bin-dir "$_BINDIR" --install-dir "${_INSTALLROOTDIR}/aws-cli" --update
43+ fi
44+ test_results="$(aws --version 2>&1 || true)"
45+ if [[ "$test_results" =~ ^aws-cli/.* ]]; then
46+ echo "$test_results"
47+ else
48+ msg_error "Installation failed - ${test_results}"
49+ if [[ "$test_results" =~ ^qemu-aarch64.*Could.*not.*open ]]; then
50+ msg_log "Make sure AWS_CLI_ARCH is set properly, current value is - ${provided_arch}"
51+ fi
52+ fi
53+ [[ -d "$workdir" ]] && rm -r "$workdir"
54+ shell : bash
2655 - name : Upload to S3
2756 env :
2857 AWS_ACCESS_KEY_ID : ${{ secrets.STORYBOOK_S3_KEY_ID }}
You can’t perform that action at this time.
0 commit comments