Skip to content

Commit 329f0f6

Browse files
chore: enable the ci build cache (#31)
Signed-off-by: Lan <gcslyp@gmail.com>
1 parent f38ae46 commit 329f0f6

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/commit.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,21 @@ jobs:
121121
uses: docker/build-push-action@v6
122122
if: github.event_name != 'push'
123123
with:
124-
# TODO: setup caches.
125124
platforms: linux/amd64,linux/arm64
126125
push: true
127-
tags: ghcr.io/envoyproxy/dynamic-modules-examples:${{ github.sha }}
126+
tags: ghcr.io/${{ github.repository_owner }}/dynamic-modules-examples:${{ github.sha }}
127+
cache-from: type=gha
128+
cache-to: type=gha,mode=max
128129

129130
- name: Build and push
130131
uses: docker/build-push-action@v6
131132
if: github.event_name == 'push'
132133
with:
133-
# TODO: setup caches.
134134
platforms: linux/amd64,linux/arm64
135135
push: true
136-
tags: ghcr.io/envoyproxy/dynamic-modules-examples:${{ github.sha }},ghcr.io/envoyproxy/dynamic-modules-examples:latest
136+
tags: ghcr.io/${{ github.repository_owner }}/dynamic-modules-examples:${{ github.sha }},ghcr.io/${{ github.repository_owner }}/dynamic-modules-examples:latest
137+
cache-from: type=gha
138+
cache-to: type=gha,mode=max
137139

138140
integration_test:
139141
needs: [docker_build]
@@ -167,5 +169,5 @@ jobs:
167169
key: unittest-${{ hashFiles('**/go.mod', '**/go.sum') }}-${{ matrix.platform.os }}
168170
- name: Run integration tests
169171
env:
170-
ENVOY_IMAGE: ghcr.io/envoyproxy/dynamic-modules-examples:${{ github.sha }}
172+
ENVOY_IMAGE: ghcr.io/${{ github.repository_owner }}/dynamic-modules-examples:${{ github.sha }}
171173
run: go test -v -count=1 ./...

0 commit comments

Comments
 (0)