diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index 84523983a0a..147a1a75cf5 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -35,7 +35,8 @@ runs: shell: bash - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 + if: ${{ inputs.name == 'no-cuda' }} id: cache with: path: | @@ -45,8 +46,19 @@ runs: cache-${{ inputs.platform }}-${{ inputs.name }}- cache-${{ inputs.platform }}- + - name: Restore cache + uses: actions/cache/restore@v4 + if: ${{ inputs.name != 'no-cuda' }} + with: + path: | + root-ccache + key: cache-${{ matrix.platform }}-${{ matrix.name }}-${{ hashFiles('autoware.repos') }} + restore-keys: | + cache-${{ matrix.platform }}-${{ matrix.name }}- + cache-${{ matrix.platform }}- + - name: Inject cache into docker - uses: reproducible-containers/buildkit-cache-dance@v3.1.0 + uses: reproducible-containers/buildkit-cache-dance@v3.1.2 with: cache-map: | {