Skip to content

Commit

Permalink
add cache for Buildah layers in GitHub Actions
Browse files Browse the repository at this point in the history
- Configures cache for `/var/lib/containers/storage` using `actions/cache@v4`.
- Implements keys to reuse layers from previous builds.
- Enables layer reuse in Buildah with `layers: true`.
  • Loading branch information
marcosmamorim committed Jan 6, 2025
1 parent d42daf9 commit 868f529
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build-ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ jobs:
with:
platforms: all

- name: Cache Buildah layers
uses: actions/cache@v4
with:
path: /var/lib/containers/storage
key: ${{ runner.os }}-buildah-cache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildah-cache-
- name: Buildah Action
uses: redhat-actions/buildah-build@v2
id: build-image
Expand All @@ -53,6 +61,7 @@ jobs:
context: tools/execution_environments/ee-multicloud-public
containerfiles: |-
tools/execution_environments/ee-multicloud-public/Containerfile
layers: true

- name: Push To quay.io
id: push-to-quay
Expand Down

0 comments on commit 868f529

Please sign in to comment.