Skip to content

Commit 7e02dc4

Browse files
committed
workflows: Install awscli via AWS CLI repo
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent d1cf1ff commit 7e02dc4

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/call-build-linux-packages.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,21 @@ jobs:
163163
# For ubuntu map to codename using the disto-info list (CSV)
164164
run: |
165165
sudo apt-get update
166-
sudo apt-get install -y distro-info awscli
166+
sudo apt-get install -y distro-info-data ca-certificates curl unzip
167+
168+
if ! command -v aws >/dev/null 2>&1; then
169+
arch="$(uname -m)"
170+
case "$arch" in
171+
aarch64|arm64) AWSCLI_URL="https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" ;;
172+
x86_64|amd64) AWSCLI_URL="https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" ;;
173+
*) AWSCLI_URL="https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" ;;
174+
esac
175+
tmp="$(mktemp -d)"
176+
curl --retry 5 --retry-delay 2 --retry-all-errors -fsSL "$AWSCLI_URL" -o "$tmp/awscliv2.zip"
177+
unzip -q "$tmp/awscliv2.zip" -d "$tmp"
178+
sudo "$tmp/aws/install"
179+
rm -rf "$tmp"
180+
fi
167181
TARGET=${DISTRO%*.arm64v8}
168182
if [[ "$TARGET" == "ubuntu/"* ]]; then
169183
UBUNTU_CODENAME=$(cut -d ',' -f 1,3 < "/usr/share/distro-info/ubuntu.csv"|grep "${TARGET##*/}"|cut -d ',' -f 2)

0 commit comments

Comments
 (0)