diff --git a/.github/actions/docker/action.yaml b/.github/actions/docker/action.yaml index 8bf1df906c..cfd35a19ec 100644 --- a/.github/actions/docker/action.yaml +++ b/.github/actions/docker/action.yaml @@ -182,7 +182,7 @@ runs: SCCACHE_BUCKET=${{ inputs.cache_bucket }} SCCACHE_REGION=${{ inputs.cache_region }} SCCACHE_ENDPOINT=${{ inputs.cache_endpoint }} - SCCACHE_S3_KEY_PREFIX=${{ runner.os }}/sccache/${{ runner.arch }}/linux-gnu + SCCACHE_S3_KEY_PREFIX=${{ env.SCCACHE_S3_KEY_PREFIX }} SCCACHE_VERSION=${{ env.SCCACHE_VERSION }} AWS_PROFILE=sccache cache-from: ${{ steps.layer_cache_settings.outputs.cache_from }} diff --git a/.github/actions/rust/action.yaml b/.github/actions/rust/action.yaml index 722e7df55f..ff26db3fad 100644 --- a/.github/actions/rust/action.yaml +++ b/.github/actions/rust/action.yaml @@ -82,12 +82,6 @@ runs: echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV export PATH="${PATH}:${HOME}/.local/bin" - - name: Install sccache-cache - uses: mozilla-actions/sccache-action@v0.0.6 - with: - version: "v0.8.2" # Must be the same as in Dockerfile - if: inputs.cache == 'true' - - name: Set HOME variable to github context shell: bash run: echo "HOME=$HOME" >> $GITHUB_ENV diff --git a/.github/actions/sccache/action.yaml b/.github/actions/sccache/action.yaml index 2984abc6c0..ac9e42da98 100644 --- a/.github/actions/sccache/action.yaml +++ b/.github/actions/sccache/action.yaml @@ -18,8 +18,9 @@ inputs: description: S3 endpoint secret access key required: true platform: - description: "Platform and architecture to use when caching; helps to avoid invalid cache on different arch" - required: true + description: "Platform and architecture to use when caching; defaults to linux/amd64" + required: false + default: "linux/amd64" install: description: "Install sccache" default: "true" @@ -53,6 +54,6 @@ runs: echo "SCCACHE_BUCKET=${{ inputs.bucket }}" >> $GITHUB_ENV echo "SCCACHE_REGION=${{ inputs.region }}" >> $GITHUB_ENV echo "SCCACHE_ENDPOINT=${{ inputs.endpoint }}" >> $GITHUB_ENV - echo "SCCACHE_S3_KEY_PREFIX=${{ runner.os }}/sccache/${{ inputs.platform }}/" >> $GITHUB_ENV + echo "SCCACHE_S3_KEY_PREFIX=sccache/${{ inputs.platform }}/" >> $GITHUB_ENV # "SCCACHE_VERSION" is used inside Docker to install the same version of sccache echo "SCCACHE_VERSION=${{ inputs.version }}" >> $GITHUB_ENV