diff --git a/README.md b/README.md index ada6b87..75100f3 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ jobs: key: cache-${{ hashFiles('.github/workflows/test/Dockerfile') }} - name: inject cache into docker - uses: reproducible-containers/buildkit-cache-dance@v3.0.0 + uses: reproducible-containers/buildkit-cache-dance@v3.1.0 with: cache-map: | { @@ -89,14 +89,19 @@ Real-world examples: Optionally, instead of a single string for the `target`, you can provide an object with additional options that should be passed to `--mount=type=cache` in the values `cache-map` JSON. The `target` path must be present in the object as a property. -```json -{ - "var-cache-apt": { - "target": "/var/cache/apt", - "id": "1" - }, - "var-lib-apt": "/var/lib/apt" -} +```yaml + - name: inject cache into docker + uses: reproducible-containers/buildkit-cache-dance@v3.1.0 + with: + cache-map: | + { + "var-cache-apt": { + "target": "/var/cache/apt", + "id": "1" + }, + "var-lib-apt": "/var/lib/apt" + } + skip-extraction: ${{ steps.cache.outputs.cache-hit }} ``` ## CLI Usage @@ -104,19 +109,19 @@ Optionally, instead of a single string for the `target`, you can provide an obje In other CI systems, you can run the script directly via `node`: ```shell -curl -LJO https://github.com/reproducible-containers/buildkit-cache-dance/archive/refs/tags/v3.0.0.tar.gz -tar xvf buildkit-cache-dance-3.0.0.tar.gz +curl -LJO https://github.com/reproducible-containers/buildkit-cache-dance/archive/refs/tags/v3.1.0.tar.gz +tar xvf buildkit-cache-dance-3.1.0.tar.gz ``` During injection: ```shell -node ./buildkit-cache-dance-3.0.0/dist/index.js --cache-map '{"var-cache-apt": "/var/cache/apt", "var-lib-apt": "/var/lib/apt"}' +node ./buildkit-cache-dance-3.1.0/dist/index.js --cache-map '{"var-cache-apt": "/var/cache/apt", "var-lib-apt": "/var/lib/apt"}' ``` After build during extraction: ```shell -node ./buildkit-cache-dance-3.0.0/dist/index.js --extract --cache-map '{"var-cache-apt": "/var/cache/apt", "var-lib-apt": "/var/lib/apt"}' +node ./buildkit-cache-dance-3.1.0/dist/index.js --extract --cache-map '{"var-cache-apt": "/var/cache/apt", "var-lib-apt": "/var/lib/apt"}' ``` Here are the available options: diff --git a/package.json b/package.json index f6ac45f..370fc66 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "buildkit-cache-dance", - "version": "3.0.0", - "description": "", + "version": "3.1.0", + "description": "Save `RUN --mount=type=cache` caches on GitHub Actions or other CI platforms", "main": "dist/index.js", "source": "src/index.ts", "type": "module",