Skip to content

Commit 23a16bf

Browse files
committed
Update publish.yml
1 parent 0efba75 commit 23a16bf

File tree

1 file changed

+12
-54
lines changed

1 file changed

+12
-54
lines changed

.github/workflows/publish.yml

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -79,48 +79,26 @@ jobs:
7979
type=semver,pattern={{major}}.{{minor}}
8080
type=raw,value=latest
8181
82-
# Build and push proxy AMD64
83-
- name: Build and push proxy_only Docker image AMD64
82+
# Build and push proxy_only multi-arch
83+
- name: Build and push proxy_only Docker image (multi-arch)
8484
uses: docker/build-push-action@v5
8585
with:
8686
context: .
8787
file: Dockerfile.proxy_only
8888
push: true
89-
platforms: linux/amd64
89+
platforms: linux/amd64,linux/arm64
9090
tags: ${{ steps.meta-proxy.outputs.tags }}
9191
labels: ${{ steps.meta-proxy.outputs.labels }}
92-
cache-from: type=gha,scope=proxy-amd64
93-
cache-to: type=gha,scope=proxy-amd64,mode=max
92+
cache-from: type=gha
93+
cache-to: type=gha,mode=max
9494
outputs: type=registry,compression=zstd,compression-level=5
9595

96-
# Cleanup after AMD64 build
97-
- name: Cleanup after AMD64 build
96+
# Cleanup after proxy build
97+
- name: Cleanup after proxy build
9898
run: |
9999
docker system prune -af
100100
docker builder prune -af
101101
df -h
102-
103-
# Build proxy ARM64
104-
- name: Build and push proxy_only Docker image ARM64
105-
uses: docker/build-push-action@v5
106-
with:
107-
context: .
108-
file: Dockerfile.proxy_only
109-
push: true
110-
platforms: linux/arm64
111-
tags: ${{ steps.meta-proxy.outputs.tags }}
112-
labels: ${{ steps.meta-proxy.outputs.labels }}
113-
cache-from: type=gha,scope=proxy-arm64
114-
cache-to: type=gha,scope=proxy-arm64,mode=max
115-
outputs: type=registry,compression=zstd,compression-level=5
116-
117-
# Cleanup after proxy builds
118-
- name: Cleanup after proxy builds
119-
run: |
120-
docker system prune -af
121-
docker builder prune -af
122-
find /tmp -type f -user $(id -u) -exec rm -f {} + 2>/dev/null || true
123-
df -h
124102
125103
# Extract metadata for full image
126104
- name: Extract metadata for Docker
@@ -133,35 +111,15 @@ jobs:
133111
type=semver,pattern={{major}}.{{minor}}
134112
latest
135113
136-
# Build full image AMD64
137-
- name: Build and push Docker image AMD64
138-
uses: docker/build-push-action@v5
139-
with:
140-
context: .
141-
push: true
142-
platforms: linux/amd64
143-
tags: ${{ steps.meta.outputs.tags }}
144-
labels: ${{ steps.meta.outputs.labels }}
145-
cache-from: type=gha,scope=full-amd64
146-
cache-to: type=gha,scope=full-amd64,mode=max
147-
outputs: type=registry,compression=zstd,compression-level=5
148-
149-
# Cleanup between architectures
150-
- name: Cleanup between architectures
151-
run: |
152-
docker system prune -af
153-
docker builder prune -af
154-
df -h
155-
156-
# Build full image ARM64
157-
- name: Build and push Docker image ARM64
114+
# Build full image multi-arch
115+
- name: Build and push Docker image (multi-arch)
158116
uses: docker/build-push-action@v5
159117
with:
160118
context: .
161119
push: true
162-
platforms: linux/arm64
120+
platforms: linux/amd64,linux/arm64
163121
tags: ${{ steps.meta.outputs.tags }}
164122
labels: ${{ steps.meta.outputs.labels }}
165-
cache-from: type=gha,scope=full-arm64
166-
cache-to: type=gha,scope=full-arm64,mode=max
123+
cache-from: type=gha
124+
cache-to: type=gha,mode=max
167125
outputs: type=registry,compression=zstd,compression-level=5

0 commit comments

Comments
 (0)