Skip to content

Commit 6f6471e

Browse files
committed
Use Zstd compression for published images to reduce their size and speedup decompression
1 parent be9a800 commit 6f6471e

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

.github/workflows/addon-deploy.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ jobs:
137137
- name: ⤵️ Download base image
138138
if: steps.flags.outputs.from != 'null'
139139
run: docker pull "${{ steps.flags.outputs.from }}"
140-
- name: 🚀 Build
140+
- name: 🚀 Build & Push
141141
uses: docker/build-push-action@v6.18.0
142142
with:
143143
load: true
144+
outputs:
145+
- type=image,oci-mediatypes=true,compression=zstd,push=true
144146
# yamllint disable rule:line-length
145147
tags: |
146148
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}
@@ -170,13 +172,6 @@ jobs:
170172
run: |
171173
rm -rf /tmp/.docker-cache
172174
mv /tmp/.docker-cache-new /tmp/.docker-cache
173-
- name: 🚀 Push
174-
# yamllint disable rule:line-length
175-
run: |
176-
docker push \
177-
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}"
178-
docker push \
179-
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
180175
181176
publish-edge:
182177
name: 📢 Publish to edge repository

.github/workflows/base-deploy.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@ jobs:
102102
registry: ghcr.io
103103
username: ${{ github.repository_owner }}
104104
password: ${{ secrets.GITHUB_TOKEN }}
105-
- name: 🚀 Build
105+
- name: 🚀 Build & Push
106106
uses: docker/build-push-action@v6.18.0
107107
with:
108108
load: true
109+
outputs:
110+
- type=image,oci-mediatypes=true,compression=zstd,push=true
109111
# yamllint disable rule:line-length
110112
tags: |
111113
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}
@@ -125,13 +127,6 @@ jobs:
125127
BUILD_REF=${{ github.sha }}
126128
BUILD_REPOSITORY=${{ github.repository }}
127129
BUILD_VERSION=${{ needs.information.outputs.version }}
128-
- name: 🚀 Push
129-
# yamllint disable rule:line-length
130-
run: |
131-
docker push \
132-
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}"
133-
docker push \
134-
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
135130
136131
manifest:
137132
name: 👷 Build & Deploy Multi Arch Manifest

0 commit comments

Comments
 (0)