Skip to content

Commit 95a7bb7

Browse files
committed
ci: switch to GitHub caching
1 parent 9b545d1 commit 95a7bb7

10 files changed

+30
-120
lines changed

.github/workflows/docker-build-dev-base.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,8 @@ jobs:
4747
username: ${{ vars.DOCKER_USERNAME }}
4848
password: ${{ secrets.DOCKER_PASSWORD }}
4949

50-
- name: Cache Docker layers
51-
uses: actions/cache@v4
52-
id: cache
53-
with:
54-
path: /tmp/.buildx-cache
55-
key: ${{ runner.os }}-buildx-base-${{ github.sha }}
56-
restore-keys: |
57-
${{ runner.os }}-buildx-base-
58-
5950
- name: Build and push
60-
uses: docker/build-push-action@v2
51+
uses: docker/build-push-action@v6
6152
with:
6253
context: elkserver/docker/redelk-base
6354
file: ./elkserver/docker/redelk-base/Dockerfile
@@ -66,8 +57,8 @@ jobs:
6657
tags: ${{ steps.docker_meta.outputs.tags }}
6758
labels: ${{ steps.docker_meta.outputs.labels }}
6859
build-args: ${{ steps.prepare.outputs.build_args }}
69-
cache-from: type=local,src=/tmp/.buildx-cache
70-
cache-to: type=local,dest=/tmp/.buildx-cache
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max
7162
# tags: |
7263
# ${{ steps.semver_parser.outputs.major }}
7364
# ${{ steps.semver_parser.outputs.major }}.${{ steps.semver_parser.outputs.minor }}

.github/workflows/docker-build-dev-elasticsearch.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,8 @@ jobs:
4747
username: ${{ vars.DOCKER_USERNAME }}
4848
password: ${{ secrets.DOCKER_PASSWORD }}
4949

50-
- name: Cache Docker layers
51-
uses: actions/cache@v4
52-
id: cache
53-
with:
54-
path: /tmp/.buildx-cache
55-
key: ${{ runner.os }}-buildx-elasticsearch-${{ github.sha }}
56-
restore-keys: |
57-
${{ runner.os }}-buildx-elasticsearch-
58-
5950
- name: Build and push
60-
uses: docker/build-push-action@v2
51+
uses: docker/build-push-action@v6
6152
with:
6253
context: elkserver/docker/redelk-elasticsearch
6354
file: ./elkserver/docker/redelk-elasticsearch/Dockerfile
@@ -66,5 +57,5 @@ jobs:
6657
tags: ${{ steps.docker_meta.outputs.tags }}
6758
labels: ${{ steps.docker_meta.outputs.labels }}
6859
build-args: ${{ steps.prepare.outputs.build_args }}
69-
cache-from: type=local,src=/tmp/.buildx-cache
70-
cache-to: type=local,dest=/tmp/.buildx-cache
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max

.github/workflows/docker-build-dev-jupyter.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,8 @@ jobs:
4747
username: ${{ vars.DOCKER_USERNAME }}
4848
password: ${{ secrets.DOCKER_PASSWORD }}
4949

50-
- name: Cache Docker layers
51-
uses: actions/cache@v4
52-
id: cache
53-
with:
54-
path: /tmp/.buildx-cache
55-
key: ${{ runner.os }}-buildx-jupyter-${{ github.sha }}
56-
restore-keys: |
57-
${{ runner.os }}-buildx-jupyter-
58-
5950
- name: Build and push
60-
uses: docker/build-push-action@v2
51+
uses: docker/build-push-action@v6
6152
with:
6253
context: elkserver/docker/redelk-jupyter
6354
file: ./elkserver/docker/redelk-jupyter/Dockerfile
@@ -66,5 +57,5 @@ jobs:
6657
tags: ${{ steps.docker_meta.outputs.tags }}
6758
labels: ${{ steps.docker_meta.outputs.labels }}
6859
build-args: ${{ steps.prepare.outputs.build_args }}
69-
cache-from: type=local,src=/tmp/.buildx-cache
70-
cache-to: type=local,dest=/tmp/.buildx-cache
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max

.github/workflows/docker-build-dev-kibana.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,8 @@ jobs:
4747
username: ${{ vars.DOCKER_USERNAME }}
4848
password: ${{ secrets.DOCKER_PASSWORD }}
4949

50-
- name: Cache Docker layers
51-
uses: actions/cache@v4
52-
id: cache
53-
with:
54-
path: /tmp/.buildx-cache
55-
key: ${{ runner.os }}-buildx-kibana-${{ github.sha }}
56-
restore-keys: |
57-
${{ runner.os }}-buildx-kibana-
58-
5950
- name: Build and push
60-
uses: docker/build-push-action@v2
51+
uses: docker/build-push-action@v6
6152
with:
6253
context: elkserver/docker/redelk-kibana
6354
file: ./elkserver/docker/redelk-kibana/Dockerfile
@@ -66,5 +57,5 @@ jobs:
6657
tags: ${{ steps.docker_meta.outputs.tags }}
6758
labels: ${{ steps.docker_meta.outputs.labels }}
6859
build-args: ${{ steps.prepare.outputs.build_args }}
69-
cache-from: type=local,src=/tmp/.buildx-cache
70-
cache-to: type=local,dest=/tmp/.buildx-cache
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max

.github/workflows/docker-build-dev-logstash.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,8 @@ jobs:
4747
username: ${{ vars.DOCKER_USERNAME }}
4848
password: ${{ secrets.DOCKER_PASSWORD }}
4949

50-
- name: Cache Docker layers
51-
uses: actions/cache@v4
52-
id: cache
53-
with:
54-
path: /tmp/.buildx-cache
55-
key: ${{ runner.os }}-buildx-logstash-${{ github.sha }}
56-
restore-keys: |
57-
${{ runner.os }}-buildx-logstash-
58-
5950
- name: Build and push
60-
uses: docker/build-push-action@v2
51+
uses: docker/build-push-action@v6
6152
with:
6253
context: elkserver/docker/redelk-logstash
6354
file: ./elkserver/docker/redelk-logstash/Dockerfile
@@ -66,5 +57,5 @@ jobs:
6657
tags: ${{ steps.docker_meta.outputs.tags }}
6758
labels: ${{ steps.docker_meta.outputs.labels }}
6859
build-args: ${{ steps.prepare.outputs.build_args }}
69-
cache-from: type=local,src=/tmp/.buildx-cache
70-
cache-to: type=local,dest=/tmp/.buildx-cache
60+
cache-from: type=gha
61+
cache-to: type=gha,mode=max

.github/workflows/docker-build-prd-base.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,8 @@ jobs:
4646
username: ${{ vars.DOCKER_USERNAME }}
4747
password: ${{ secrets.DOCKER_PASSWORD }}
4848

49-
- name: Cache Docker layers
50-
uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: /tmp/.buildx-cache
54-
key: ${{ runner.os }}-buildx-base-${{ github.sha }}
55-
restore-keys: |
56-
${{ runner.os }}-buildx-base-
57-
5849
- name: Build and push
59-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v6
6051
with:
6152
context: elkserver/docker/redelk-base
6253
file: ./elkserver/docker/redelk-base/Dockerfile
@@ -65,5 +56,5 @@ jobs:
6556
tags: ${{ steps.docker_meta.outputs.tags }}
6657
labels: ${{ steps.docker_meta.outputs.labels }}
6758
build-args: ${{ steps.prepare.outputs.build_args }}
68-
cache-from: type=local,src=/tmp/.buildx-cache
69-
cache-to: type=local,dest=/tmp/.buildx-cache
59+
cache-from: type=gha
60+
cache-to: type=gha,mode=max

.github/workflows/docker-build-prd-elasticsearch.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,8 @@ jobs:
4646
username: ${{ vars.DOCKER_USERNAME }}
4747
password: ${{ secrets.DOCKER_PASSWORD }}
4848

49-
- name: Cache Docker layers
50-
uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: /tmp/.buildx-cache
54-
key: ${{ runner.os }}-buildx-elasticsearch-${{ github.sha }}
55-
restore-keys: |
56-
${{ runner.os }}-buildx-elasticsearch-
57-
5849
- name: Build and push
59-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v6
6051
with:
6152
context: elkserver/docker/redelk-elasticsearch
6253
file: ./elkserver/docker/redelk-elasticsearch/Dockerfile
@@ -65,5 +56,5 @@ jobs:
6556
tags: ${{ steps.docker_meta.outputs.tags }}
6657
labels: ${{ steps.docker_meta.outputs.labels }}
6758
build-args: ${{ steps.prepare.outputs.build_args }}
68-
cache-from: type=local,src=/tmp/.buildx-cache
69-
cache-to: type=local,dest=/tmp/.buildx-cache
59+
cache-from: type=gha
60+
cache-to: type=gha,mode=max

.github/workflows/docker-build-prd-jupyter.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,8 @@ jobs:
4646
username: ${{ vars.DOCKER_USERNAME }}
4747
password: ${{ secrets.DOCKER_PASSWORD }}
4848

49-
- name: Cache Docker layers
50-
uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: /tmp/.buildx-cache
54-
key: ${{ runner.os }}-buildx-jupyter-${{ github.sha }}
55-
restore-keys: |
56-
${{ runner.os }}-buildx-jupyter-
57-
5849
- name: Build and push
59-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v6
6051
with:
6152
context: elkserver/docker/redelk-jupyter
6253
file: ./elkserver/docker/redelk-jupyter/Dockerfile
@@ -65,5 +56,5 @@ jobs:
6556
tags: ${{ steps.docker_meta.outputs.tags }}
6657
labels: ${{ steps.docker_meta.outputs.labels }}
6758
build-args: ${{ steps.prepare.outputs.build_args }}
68-
cache-from: type=local,src=/tmp/.buildx-cache
69-
cache-to: type=local,dest=/tmp/.buildx-cache
59+
cache-from: type=gha
60+
cache-to: type=gha,mode=max

.github/workflows/docker-build-prd-kibana.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,8 @@ jobs:
4646
username: ${{ vars.DOCKER_USERNAME }}
4747
password: ${{ secrets.DOCKER_PASSWORD }}
4848

49-
- name: Cache Docker layers
50-
uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: /tmp/.buildx-cache
54-
key: ${{ runner.os }}-buildx-kibana-${{ github.sha }}
55-
restore-keys: |
56-
${{ runner.os }}-buildx-kibana-
57-
5849
- name: Build and push
59-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v6
6051
with:
6152
context: elkserver/docker/redelk-kibana
6253
file: ./elkserver/docker/redelk-kibana/Dockerfile
@@ -65,5 +56,5 @@ jobs:
6556
tags: ${{ steps.docker_meta.outputs.tags }}
6657
labels: ${{ steps.docker_meta.outputs.labels }}
6758
build-args: ${{ steps.prepare.outputs.build_args }}
68-
cache-from: type=local,src=/tmp/.buildx-cache
69-
cache-to: type=local,dest=/tmp/.buildx-cache
59+
cache-from: type=gha
60+
cache-to: type=gha,mode=max

.github/workflows/docker-build-prd-logstash.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,8 @@ jobs:
4646
username: ${{ vars.DOCKER_USERNAME }}
4747
password: ${{ secrets.DOCKER_PASSWORD }}
4848

49-
- name: Cache Docker layers
50-
uses: actions/cache@v4
51-
id: cache
52-
with:
53-
path: /tmp/.buildx-cache
54-
key: ${{ runner.os }}-buildx-logstash-${{ github.sha }}
55-
restore-keys: |
56-
${{ runner.os }}-buildx-logstash-
57-
5849
- name: Build and push
59-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v6
6051
with:
6152
context: elkserver/docker/redelk-logstash
6253
file: ./elkserver/docker/redelk-logstash/Dockerfile
@@ -65,5 +56,5 @@ jobs:
6556
tags: ${{ steps.docker_meta.outputs.tags }}
6657
labels: ${{ steps.docker_meta.outputs.labels }}
6758
build-args: ${{ steps.prepare.outputs.build_args }}
68-
cache-from: type=local,src=/tmp/.buildx-cache
69-
cache-to: type=local,dest=/tmp/.buildx-cache
59+
cache-from: type=gha
60+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)