From ad22724d6fd11c3f70d7347a65a8874eab204f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Tremblay?= <1619947+marctrem@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:15:33 +0000 Subject: [PATCH] ci: update apt caches on deps run --- .github/actions/deps/action.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/actions/deps/action.yml b/.github/actions/deps/action.yml index c845c65005..8a93386170 100644 --- a/.github/actions/deps/action.yml +++ b/.github/actions/deps/action.yml @@ -13,6 +13,20 @@ outputs: {} runs: using: composite steps: + - name: Has apt-get? + shell: bash + run: | + if command -v apt-get > /dev/null 2>&1; then + echo "HAS_APT_GET=1" >> $GITHUB_ENV + else + echo "HAS_APT_GET=0" >> $GITHUB_ENV + fi + + - name: apt-get update + shell: bash + run: sudo apt-get update + if: env.HAS_APT_GET == '1' + - id: deps-sh-hash shell: bash run: sha256sum '${{ inputs.deps-script-path }}' | awk '{print "HASH=" $1}' >> "$GITHUB_OUTPUT"