@@ -114,7 +114,7 @@ jobs:
114114 submodules : true
115115 - name : Run documentation check
116116 run : |
117- apt-get -qq update && apt-get -qq -y install curl yq
117+ which curl yq || ( apt -q update && apt -yq install curl yq)
118118 curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-docs.sh | bash
119119
120120 unacceptable-language-check :
@@ -181,7 +181,7 @@ jobs:
181181 run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
182182 - name : Run format check
183183 run : |
184- apt-get -qq update && apt-get -qq -y install curl
184+ which curl || ( apt -q update && apt -yq install curl)
185185 curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-swift-format.sh | bash
186186
187187 shell-check :
@@ -202,7 +202,7 @@ jobs:
202202 run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
203203 - name : Run shellcheck
204204 run : |
205- apt-get -qq update && apt-get -qq -y install shellcheck
205+ which shellcheck || ( apt -q update && apt -yq install shellcheck)
206206 git ls-files -z '*.sh' | xargs -0 --no-run-if-empty shellcheck
207207
208208 yaml-lint-check :
@@ -218,7 +218,7 @@ jobs:
218218 submodules : true
219219 - name : Run yamllint
220220 run : |
221- which yamllint >/dev/null || ( apt-get update && apt-get install -y yamllint )
221+ which yamllint || (apt -q update && apt install -yq yamllint)
222222 cd ${GITHUB_WORKSPACE}
223223 if [ ! -f ".yamllint.yml" ]; then
224224 echo "Downloading default yamllint config file"
0 commit comments