Skip to content

Commit 95a9597

Browse files
authored
Use GitHub cache backend API (#210)
1 parent d66598b commit 95a9597

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ jobs:
5757
platforms: arm,arm64,ppc64le,s390x,mips64le,386
5858
- name: Docker Buildx
5959
uses: docker/setup-buildx-action@v1
60-
with:
61-
driver-opts: network=host
62-
- name: Cache Docker layers
63-
uses: actions/[email protected]
64-
with:
65-
path: /tmp/.buildx-cache
66-
key: ${{ runner.os }}-buildx-${{ github.sha }}
67-
restore-keys: |
68-
${{ runner.os }}-buildx-
6960
- name: Determine GOPATH
7061
run: echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
7162
- name: Setup Golang Environment
@@ -87,8 +78,8 @@ jobs:
8778
context: '.'
8879
target: local
8980
platforms: linux/arm,linux/arm64,linux/amd64,linux/ppc64le,linux/s390x,linux/mips64le,linux/386
90-
cache-from: type=local,src=/tmp/.buildx-cache
91-
cache-to: type=local,dest=/tmp/.buildx-cache
81+
cache-from: type=gha
82+
cache-to: type=gha,mode=max
9283
tags: nginx/nginx-prometheus-exporter:${{ github.sha }}
9384
push: false
9485

@@ -120,15 +111,6 @@ jobs:
120111
platforms: arm,arm64,ppc64le,s390x,mips64le,386
121112
- name: Docker Buildx
122113
uses: docker/setup-buildx-action@v1
123-
with:
124-
driver-opts: network=host
125-
- name: Cache Docker layers
126-
uses: actions/[email protected]
127-
with:
128-
path: /tmp/.buildx-cache
129-
key: ${{ runner.os }}-buildx-${{ github.sha }}
130-
restore-keys: |
131-
${{ runner.os }}-buildx-
132114
- name: DockerHub Login
133115
uses: docker/login-action@v1
134116
with:

0 commit comments

Comments
 (0)