-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Enable apt caching for container builds
The Dockerfile is already prepared and works locally. Now also make use of that on github. We cache per matrix job to avoid mutual overwriting. Signed-off-by: Jan Kiszka <[email protected]>
- Loading branch information
1 parent
e94ea5e
commit 3cf1f29
Showing
4 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ inputs: | |
required: true | ||
deploy-token: | ||
required: true | ||
cache-key: | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
@@ -35,3 +37,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 }}-${{ inputs.cache-key }} | ||
- 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 }}-${{ inputs.cache-key }} | ||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters