mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
ci: the Docker image is built with a layer cache
Each run built the image from nothing, compiling libvirt-python and python-ldap again. Buildx keeps the layers in GitHub's cache, so a run that changes only code rebuilds only the last stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
1549b5e9f1
commit
c72ce9a299
1 changed files with 12 additions and 1 deletions
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
|
|
@ -157,8 +157,19 @@ jobs:
|
|||
echo sentinel > "$f"
|
||||
done
|
||||
|
||||
- name: Set Up Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
# The layers stay in GitHub's cache: a change of the code alone rebuilds
|
||||
# only the last stage
|
||||
- name: Build Image
|
||||
run: docker build -t webvirtcloud:ci .
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
load: true
|
||||
tags: webvirtcloud:ci
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: No Runtime Data In Image
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue