Skip to content

Commit

Permalink
ci: Enable apt caching for container builds
Browse files Browse the repository at this point in the history
The Dockerfile is already prepared and works locally. Now also make use
of that on github.

Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
jan-kiszka committed Mar 5, 2024
1 parent ac87faf commit d1a6ea0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/actions/docker-init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,27 @@ runs:
run: |
git clone . /home/runner/kas-clone
shell: bash
- name: Cache var-cache-apt
id: cache-var-cache-apt
uses: actions/cache@v4
with:
path: var-cache-apt
key: var-cache-apt-${{ env.DEBIAN_TAG }}
- name: Cache var-lib-apt
id: cache-var-lib-apt
uses: actions/cache@v4
with:
path: var-lib-apt
key: var-lib-apt-${{ env.DEBIAN_TAG }}
- 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 }}

0 comments on commit d1a6ea0

Please sign in to comment.