Skip to content

Commit e5c5940

Browse files
authored
chore: fix action
1 parent a3f6dbb commit e5c5940

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

.github/workflows/pr-preview-deploy2.yml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,10 @@ jobs:
2424
run: echo "::set-output name=id::$(<pr/pr-id.txt)"
2525
shell: bash
2626
- 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-
wait
33-
unzip -qq awscliv2.zip
34-
wait
35-
aws_path=$(which aws || true)
36-
[[ -n "$aws_path" ]] && msg_log "aws_path = ${aws_path}"
37-
if [[ "$aws_path" =~ ^qemu-aarch64.* ]]; then
38-
msg_error "Failed to install AWS CLI - Make sure AWS_CLI_ARCH is set properly, current value is ${provided_arch}"
39-
elif [[ "$aws_path" =~ ^.*aws.*not.*found || -z "$aws_path" ]]; then
40-
# Fresh install
41-
./aws/install --bin-dir "$_BINDIR" --install-dir "${_INSTALLROOTDIR}/aws-cli"
42-
else
43-
# Update
44-
./aws/install --bin-dir "$_BINDIR" --install-dir "${_INSTALLROOTDIR}/aws-cli" --update
45-
fi
46-
test_results="$(aws --version 2>&1 || true)"
47-
if [[ "$test_results" =~ ^aws-cli/.* ]]; then
48-
echo "$test_results"
49-
else
50-
msg_error "Installation failed - ${test_results}"
51-
if [[ "$test_results" =~ ^qemu-aarch64.*Could.*not.*open ]]; then
52-
msg_log "Make sure AWS_CLI_ARCH is set properly, current value is - ${provided_arch}"
53-
fi
54-
fi
55-
[[ -d "$workdir" ]] && rm -r "$workdir"
56-
shell: bash
27+
uses: unfor19/install-aws-cli-action@v1
28+
with:
29+
version: 2.22.35
30+
arch: amd64
5731
- name: Upload to S3
5832
env:
5933
AWS_ACCESS_KEY_ID: ${{ secrets.STORYBOOK_S3_KEY_ID }}

0 commit comments

Comments
 (0)