Skip to content

Commit 19b6311

Browse files
committed
ci: enable GitHub Actions layer cache for Docker builds
1 parent 3d07955 commit 19b6311

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/build-and-push.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
1416
steps:
1517
- name: Checkout
1618
uses: actions/checkout@v4
@@ -39,7 +41,10 @@ jobs:
3941
password: ${{ secrets.DOCKER_HUB_TOKEN }}
4042

4143
- name: Build and push
42-
run: docker buildx bake all --push
44+
run: |
45+
docker buildx bake all --push \
46+
--set "*.cache-from=type=gha" \
47+
--set "*.cache-to=type=gha,mode=max"
4348
env:
4449
BUGHOG_VERSION: ${{ steps.meta.outputs.version }}
4550
ADDITIONAL_TAG: ${{ steps.meta.outputs.additional_tag }}

0 commit comments

Comments
 (0)