Skip to content

Commit 4c0e2da

Browse files
committed
Cache build layers
Signed-off-by: Samuel Monson <[email protected]>
1 parent a56b8cd commit 4c0e2da

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/development.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ jobs:
142142
uses: actions/checkout@v4
143143
with:
144144
fetch-depth: 0
145+
- name: Store/retrieve build caches
146+
id: cache-buildah
147+
uses: actions/cache@v4
148+
with:
149+
path: /var/tmp/buildah-cache-*
150+
key: buildah-mount-cache-${{ runner.os }}-${{ runner.arch }}
145151
- name: Buildah build
146152
id: build-image
147153
uses: redhat-actions/buildah-build@v2
@@ -150,6 +156,7 @@ jobs:
150156
build-args: |
151157
GUIDELLM_BUILD_TYPE=dev
152158
tags: "pr-${{ github.event.number }}"
159+
layers: true
153160
containerfiles: |
154161
./Containerfile
155162
- name: Push To ghcr.io

.github/workflows/release-candidate.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,20 @@ jobs:
185185
if: ${{ env.package_version == '' }}
186186
run: |
187187
exit 1
188+
- name: Store/retrieve build caches
189+
id: cache-buildah
190+
uses: actions/cache@v4
191+
with:
192+
path: /var/tmp/buildah-cache-*
193+
key: buildah-mount-cache-${{ runner.os }}-${{ runner.arch }}
188194
- name: Buildah build
189195
id: build-image
190196
uses: redhat-actions/buildah-build@v2
191197
with:
192198
image: ${{ github.event.repository.name }}
193199
build-args: |
194200
GUIDELLM_BUILD_TYPE=candidate
195-
tags: ${{ env.package_version }}~rc
201+
tags: ${{ env.package_version }}-rc
196202
containerfiles: |
197203
./Containerfile
198204
- name: Push To ghcr.io

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ jobs:
184184
if: ${{ env.package_version == '' }}
185185
run: |
186186
exit 1
187+
- name: Store/retrieve build caches
188+
id: cache-buildah
189+
uses: actions/cache@v4
190+
with:
191+
path: /var/tmp/buildah-cache-*
192+
key: buildah-mount-cache-${{ runner.os }}-${{ runner.arch }}
187193
- name: Buildah build
188194
id: build-image
189195
uses: redhat-actions/buildah-build@v2

0 commit comments

Comments
 (0)