File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,6 +110,44 @@ jobs:
110110 username: ${{ secrets.DOCKERPUBLICBOT_USERNAME }}
111111 password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}
112112
113+ module-image-prepare :
114+ if : startsWith(github.ref, 'refs/tags/v')
115+ runs-on : ubuntu-24.04
116+ outputs :
117+ repo-slug : docker/compose-desktop-module
118+ steps :
119+ # FIXME: can't use env object in reusable workflow inputs: https://github.com/orgs/community/discussions/26671
120+ - run : echo "Exposing env vars for reusable workflow"
121+
122+ module-image :
123+ if : startsWith(github.ref, 'refs/tags/v')
124+ uses : docker/github-builder/.github/workflows/bake.yml@70313223e2665c3211b454b3fea6534624e78d64 # v1.4.0
125+ needs :
126+ - module-image-prepare
127+ permissions :
128+ contents : read # same as global permission
129+ id-token : write # for signing attestation(s) with GitHub OIDC Token
130+ with :
131+ runner : amd64
132+ target : image-module-cross
133+ cache : true
134+ cache-scope : module-image
135+ output : image
136+ push : ${{ startsWith(github.ref, 'refs/tags/v') }}
137+ sbom : true
138+ provenance : true
139+ set-meta-labels : true
140+ meta-images : |
141+ ${{ needs.module-image-prepare.outputs.repo-slug }}
142+ meta-tags : |
143+ type=ref,event=tag
144+ meta-bake-target : meta-helper
145+ secrets :
146+ registry-auths : |
147+ - registry: docker.io
148+ username: ${{ secrets.DOCKERPUBLICBOT_USERNAME }}
149+ password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}
150+
113151 desktop-edge-test :
114152 runs-on : ubuntu-latest
115153 needs : bin-image
Original file line number Diff line number Diff line change @@ -195,3 +195,16 @@ RUN --mount=from=binary \
195195
196196FROM scratch AS release
197197COPY --from=releaser /out/ /
198+
199+ FROM --platform=$BUILDPLATFORM alpine AS module-releaser
200+ WORKDIR /work
201+ ARG TARGETOS
202+ RUN --mount=from=binary \
203+ mkdir -p /cli-plugins/compose/$TARGETOS && \
204+ cp docker-compose* "/cli-plugins/compose/$TARGETOS/docker-compose$(ls docker-compose* | sed -e 's/^docker-compose//')"
205+
206+ FROM scratch AS module
207+ ARG TARGETOS
208+ COPY --from=module-releaser /cli-plugins/compose/$TARGETOS /cli-plugins/compose/$TARGETOS
209+ COPY ./desktop-module/module-metadata.json /
210+ COPY LICENSE /
Original file line number Diff line number Diff line change 1+ {
2+ "version" : 1 ,
3+ "content" : [
4+ {
5+ "type" : " cli-plugin" ,
6+ "name" : " compose"
7+ }
8+ ]
9+ }
Original file line number Diff line number Diff line change @@ -146,3 +146,17 @@ target "image-cross" {
146146 inherits = [" meta-helper" , " binary-cross" ]
147147 output = [" type=image" ]
148148}
149+
150+ target "image-module-cross" {
151+ inherits = [" meta-helper" , " binary-cross" ]
152+ target = " module"
153+ output = [" type=image" ]
154+ platforms = [
155+ " darwin/amd64" ,
156+ " darwin/arm64" ,
157+ " linux/amd64" ,
158+ " linux/arm64" ,
159+ " windows/amd64" ,
160+ " windows/arm64" ,
161+ ]
162+ }
You can’t perform that action at this time.
0 commit comments