From d5d44fa17c748fae2afa37d4daf597a98cdd18ba Mon Sep 17 00:00:00 2001 From: BenjaminCh Date: Tue, 3 May 2022 15:01:54 +0200 Subject: [PATCH] tests: fix sccache release retrieval (#705) --- .github/workflows/tests.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7eb52ed9..ba465df9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,20 +21,23 @@ jobs: - uses: hashicorp/setup-terraform@v1 with: terraform_version: 0.14.10 + - uses: sergeysova/jq-action@v2 + id: sccache_release + with: + cmd: 'curl --silent "https://api.github.com/repos/Qovery/sccache-bin/releases/latest" | jq .tag_name' + multiline: false - name: build-linter-utests run: | echo "########## LINTER ##########" cargo fmt --all -- --check --color=always || (echo "Use cargo fmt to format your code"; exit 1) rustup component add clippy cargo clippy --locked --all --all-features --lib -- -D warnings || (echo "Solve your clippy warnings to continue"; exit 1) - export PATH=$GITHUB_WORKSPACE/bin:$PATH export RUSTC_WRAPPER=$GITHUB_WORKSPACE/bin/sccache export SCCACHE_REDIS=${{ secrets.SCCACHE_REDIS }} export TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache mkdir -p $GITHUB_WORKSPACE/bin $HOME/.terraform.d/plugin-cache - sccache_release=$(curl --silent "https://github.com/Qovery/sccache-bin/releases/latest" | sed -r 's/^.+tag\/(.+)">.+/\1/') - curl -sLo $GITHUB_WORKSPACE/bin/sccache https://github.com/Qovery/sccache-bin/releases/download/${sccache_release}/sccache + curl -sLo $GITHUB_WORKSPACE/bin/sccache https://github.com/Qovery/sccache-bin/releases/download/${{ steps.sccache_release.outputs.value }}/sccache chmod 755 $GITHUB_WORKSPACE/bin/sccache echo "########## SHARED CACHE STATUS ##########" sccache --version