Skip to content

Commit ec1b37a

Browse files
committed
chore(ci): Publish - use GHA cache + setup buildx
1 parent 7f359d9 commit ec1b37a

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ jobs:
505505
uses: docker/setup-qemu-action@v3
506506
- name: Copy yarn.lock file
507507
run: cp yarn.lock packages/cubejs-docker
508+
- name: Set up Docker Buildx
509+
uses: docker/setup-buildx-action@v3
508510
- name: Push to Docker Hub
509511
uses: docker/build-push-action@v6
510512
with:
@@ -598,13 +600,8 @@ jobs:
598600
with:
599601
username: ${{ secrets.DOCKERHUB_USERNAME }}
600602
password: ${{ secrets.DOCKERHUB_TOKEN }}
601-
- name: Cache Docker layers
602-
uses: actions/cache@v4
603-
with:
604-
path: /tmp/.buildx-cache
605-
key: ${{ runner.os }}-${{ matrix.target }}-buildx-${{ matrix.tag }}-${{ github.sha }}
606-
restore-keys: |
607-
${{ runner.os }}-${{ matrix.target }}-buildx-${{ matrix.tag }}-
603+
- name: Set up Docker Buildx
604+
uses: docker/setup-buildx-action@v3
608605
- name: Push to Docker Hub
609606
uses: docker/build-push-action@v6
610607
with:
@@ -614,8 +611,8 @@ jobs:
614611
build-args: ${{ matrix.build-args }}
615612
push: true
616613
tags: ${{ steps.prep.outputs.tags }}
617-
cache-from: type=local,src=/tmp/.buildx-cache
618-
cache-to: type=local,dest=/tmp/.buildx-cache
614+
cache-from: type=gha
615+
cache-to: type=gha,mode=max
619616
labels: |
620617
org.opencontainers.image.title=${{ fromJson(steps.repo.outputs.result).name }}
621618
org.opencontainers.image.description=${{ fromJson(steps.repo.outputs.result).description }}

0 commit comments

Comments
 (0)