Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,21 @@ jobs:
id: meta
with:
images: YOUR_IMAGE

- name: Cache var-cache-apt
id: cache-var-cache-apt
uses: actions/cache@v3
with:
path: var-cache-apt
key: var-cache-apt-${{ hashFiles('Dockerfile') }}
- name: Cache var-lib-apt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var-lib-apt is not a duplicate of var-cache-apt

Copy link
Contributor Author

@aminya aminya Mar 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, okay. The code is so terse, it is hard to read. Is this boilerplate repetition needed because of not supporting an array API? Why not have an array of source-to-target maps?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/cache supports multiple paths in one call. It seems buildkit-cache-dance lacks this support

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contribution is wanted to add the support

id: cache-var-lib-apt
uses: actions/cache@v3
with:
path: var-lib-apt
key: var-lib-apt-${{ hashFiles('Dockerfile') }}

- name: inject var-cache-apt into docker
uses: reproducible-containers/[email protected]
with:
cache-source: var-cache-apt
cache-target: /var/cache/apt
skip-extraction: ${{ steps.cache-var-cache-apt.outputs.cache-hit }}
- name: inject var-lib-apt into docker
uses: reproducible-containers/[email protected]
with:
cache-source: var-lib-apt
cache-target: /var/lib/apt
skip-extraction: ${{ steps.cache-var-lib-apt.outputs.cache-hit }}

- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down