@@ -106,11 +106,12 @@ jobs:
106106 cache-prefix : ${{env.exe_cache_prefix}}
107107
108108 # Separate jobs for the docker builds because they requires elevated github token permissions.
109- share-api-docker-build :
109+ share-task-runner-docker-build :
110+ if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/task-') }}
110111 env :
111112 container_registry : ghcr.io
112- docker_image_name : share-api
113- needs : [build-exe ]
113+ docker_image_name : share-task-runner
114+ needs : [build-exes ]
114115 runs-on : ubuntu-24.04
115116 # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
116117 permissions :
@@ -131,7 +132,7 @@ jobs:
131132 # Downloads the artifact that contains the share-api-exe from the previous job.
132133 - uses : actions/download-artifact@v4
133134 with :
134- name : share-api -exe
135+ name : share-task-runner -exe
135136 path : ./docker/tmp/
136137
137138 # Configure Docker's builder,
@@ -166,8 +167,8 @@ jobs:
166167 uses : docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
167168 with :
168169 context : ./docker/
169- file : ./docker/share-api .Dockerfile
170- push : ${{ env.is_published_build }}
170+ file : ./docker/task-runner .Dockerfile
171+ push : true
171172 tags : ${{ steps.meta.outputs.tags }}
172173 labels : ${{ steps.meta.outputs.labels }}
173174 # Use github actions cache for docker image layers
@@ -178,28 +179,21 @@ jobs:
178179 # Save image locally for use in tests even if we don't push it.
179180 outputs : type=docker,dest=/tmp/share-docker-image.tar # export docker image
180181
181- - name : Save docker image for transcript tests
182- uses : actions/upload-artifact@v4
183- with :
184- name : share-docker-image
185- path : /tmp/share-docker-image.tar
186-
187182 # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
188183 - name : Generate artifact attestation
189184190- if : ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') }}
191185 with :
192186 subject-name : ${{ env.container_registry }}/${{ env.docker_image_name}}
193187 subject-digest : ${{ steps.push.outputs.digest }}
194188 push-to-registry : true
195189
190+
196191 # Separate jobs for the docker builds because they requires elevated github token permissions.
197- share-task-runner-docker-build :
198- if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/task-') }}
192+ share-api-docker-build :
199193 env :
200194 container_registry : ghcr.io
201- docker_image_name : share-task-runner
202- needs : [build-exes ]
195+ docker_image_name : share-api
196+ needs : [build-exe ]
203197 runs-on : ubuntu-24.04
204198 # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
205199 permissions :
@@ -220,7 +214,7 @@ jobs:
220214 # Downloads the artifact that contains the share-api-exe from the previous job.
221215 - uses : actions/download-artifact@v4
222216 with :
223- name : share-task-runner -exe
217+ name : share-api -exe
224218 path : ./docker/tmp/
225219
226220 # Configure Docker's builder,
@@ -255,8 +249,8 @@ jobs:
255249 uses : docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
256250 with :
257251 context : ./docker/
258- file : ./docker/task-runner .Dockerfile
259- push : true
252+ file : ./docker/share-api .Dockerfile
253+ push : ${{ env.is_published_build }}
260254 tags : ${{ steps.meta.outputs.tags }}
261255 labels : ${{ steps.meta.outputs.labels }}
262256 # Use github actions cache for docker image layers
@@ -267,9 +261,16 @@ jobs:
267261 # Save image locally for use in tests even if we don't push it.
268262 outputs : type=docker,dest=/tmp/share-docker-image.tar # export docker image
269263
264+ - name : Save docker image for transcript tests
265+ uses : actions/upload-artifact@v4
266+ with :
267+ name : share-docker-image
268+ path : /tmp/share-docker-image.tar
269+
270270 # This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
271271 - name : Generate artifact attestation
272272273+ if : ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') }}
273274 with :
274275 subject-name : ${{ env.container_registry }}/${{ env.docker_image_name}}
275276 subject-digest : ${{ steps.push.outputs.digest }}
0 commit comments