@@ -64,18 +64,28 @@ jobs:
6464 image : archlinux:latest
6565 steps :
6666 - name : Install git
67+ shell : bash
6768 run : |
6869 set -euo pipefail
6970 for attempt in 1 2 3 4 5; do
7071 case "${{ matrix.distro }}" in
7172 debian|ubuntu)
72- apt-get update -qq && apt-get install -y -qq git && exit 0 ;;
73+ if apt-get update -qq && apt-get install -y -qq git; then
74+ exit 0
75+ fi
76+ ;;
7377 fedora)
74- dnf install -y -q git && exit 0 ;;
78+ if dnf install -y -q git; then
79+ exit 0
80+ fi
81+ ;;
7582 archlinux)
76- pacman -Sy --noconfirm --quiet git && exit 0 ;;
83+ if pacman -Sy --noconfirm --quiet git; then
84+ exit 0
85+ fi
86+ ;;
7787 esac
78- echo "git install attempt $attempt failed; retrying in $((attempt * 5))s..." >&2
88+ echo "git install attempt ${ attempt} failed; retrying in $((attempt * 5))s..." >&2
7989 sleep $((attempt * 5))
8090 done
8191 echo "git install failed after retries" >&2
@@ -132,44 +142,50 @@ jobs:
132142 steps :
133143 - name : Install dependencies (Debian/Ubuntu)
134144 if : matrix.distro == 'debian' || matrix.distro == 'ubuntu'
145+ shell : bash
135146 run : |
136147 set -euo pipefail
137- pkgs='git jq python3 python3-yaml curl unzip tar coreutils procps util-linux sudo bash cron'
138148 for attempt in 1 2 3 4 5; do
139- if apt-get update -qq && apt-get install -y -qq $pkgs >/dev/null; then
149+ if apt-get update -qq && apt-get install -y -qq \
150+ git jq python3 python3-yaml curl unzip tar coreutils procps util-linux \
151+ sudo bash cron >/dev/null; then
140152 exit 0
141153 fi
142- echo "apt install attempt $attempt failed; retrying in $((attempt * 5))s..." >&2
154+ echo "apt install attempt ${ attempt} failed; retrying in $((attempt * 5))s..." >&2
143155 sleep $((attempt * 5))
144156 done
145157 echo "apt install failed after retries" >&2
146158 exit 1
147159
148160 - name : Install dependencies (Fedora)
149161 if : matrix.distro == 'fedora'
162+ shell : bash
150163 run : |
151164 set -euo pipefail
152- pkgs='git jq python3 python3-pyyaml curl unzip tar coreutils procps-ng util-linux sudo bash cronie shadow-utils'
153165 for attempt in 1 2 3 4 5; do
154- if dnf install -y -q $pkgs; then
166+ if dnf install -y -q \
167+ git jq python3 python3-pyyaml curl unzip tar coreutils procps-ng util-linux \
168+ sudo bash cronie shadow-utils; then
155169 exit 0
156170 fi
157- echo "dnf install attempt $attempt failed; retrying in $((attempt * 5))s..." >&2
171+ echo "dnf install attempt ${ attempt} failed; retrying in $((attempt * 5))s..." >&2
158172 sleep $((attempt * 5))
159173 done
160174 echo "dnf install failed after retries" >&2
161175 exit 1
162176
163177 - name : Install dependencies (Arch)
164178 if : matrix.distro == 'archlinux'
179+ shell : bash
165180 run : |
166181 set -euo pipefail
167- pkgs='git jq python python-yaml curl unzip tar coreutils procps-ng util-linux sudo bash cronie shadow'
168182 for attempt in 1 2 3 4 5; do
169- if pacman -Sy --noconfirm --quiet $pkgs; then
183+ if pacman -Sy --noconfirm --quiet \
184+ git jq python python-yaml curl unzip tar coreutils procps-ng util-linux \
185+ sudo bash cronie shadow; then
170186 exit 0
171187 fi
172- echo "pacman install attempt $attempt failed; retrying in $((attempt * 5))s..." >&2
188+ echo "pacman install attempt ${ attempt} failed; retrying in $((attempt * 5))s..." >&2
173189 sleep $((attempt * 5))
174190 done
175191 echo "pacman install failed after retries" >&2
0 commit comments