Skip to content

Commit 3e0a7f1

Browse files
committed
ci: enhance naming and streamline service matrix
1 parent 66962ab commit 3e0a7f1

1 file changed

Lines changed: 18 additions & 63 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ jobs:
263263
type: ${{ matrix.type }}
264264

265265
build-gh-docker:
266-
name: 🚢 Build Docker
266+
name: 🚢 Build Docker (${{ matrix.service }}-${{ matrix.type }}-${{ matrix.arch }})
267267
needs: [build, release-versions]
268268
runs-on: ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }}
269269

@@ -275,26 +275,32 @@ jobs:
275275
fail-fast: false
276276
matrix:
277277
arch: [arm64, amd64]
278-
service:
279-
[
280-
[authorization-service, queue-worker-service, ddp-streamer-service],
281-
[account-service, presence-service, omnichannel-transcript-service],
282-
[rocketchat],
283-
]
278+
service: [authorization-service, queue-worker-service, ddp-streamer-service, account-service, presence-service, omnichannel-transcript-service, rocketchat]
284279
type:
285280
# if running in a PR build with coverage
286281
- ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}
282+
exclude:
283+
# avoid duplicate rocketchat coverage rows in PRs (the include rows below handle coverage)
284+
- arch: amd64
285+
service: rocketchat
286+
type: ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || '' }}
287+
- arch: arm64
288+
service: rocketchat
289+
type: ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || '' }}
287290
include:
288291
# if not, build with coverage for tests
289292
- arch: amd64
290-
service: [rocketchat]
293+
service: rocketchat
291294
type: coverage
292295
- arch: arm64
293-
service: [rocketchat]
296+
service: rocketchat
294297
type: coverage
295298
# build dedicated FIPS images for FIPS test lanes
296299
- arch: amd64
297-
service: [ddp-streamer-service, presence-service]
300+
service: ddp-streamer-service
301+
type: fips
302+
- arch: amd64
303+
service: presence-service
298304
type: fips
299305

300306
steps:
@@ -312,7 +318,7 @@ jobs:
312318
tar -xzf /tmp/RocketChat-packages-build.tar.gz -C .
313319
314320
# we only build and publish the actual docker images if not a PR from a fork
315-
- name: Image ${{ matrix.service[0] }}
321+
- name: Image ${{ matrix.service }}
316322
uses: ./.github/actions/build-docker
317323
if: github.actor != 'dependabot[bot]'
318324
env:
@@ -325,60 +331,9 @@ jobs:
325331
TEMP_DOCKERHUB_FIPS_PASS: ${{ secrets.TEMP_DOCKERHUB_FIPS_PASS }}
326332
deno-version: ${{ needs.release-versions.outputs.deno-version }}
327333
arch: ${{ matrix.arch }}
328-
service: ${{ matrix.service[0] }}
329-
type: ${{ matrix.type }}
330-
publish-image: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' }}
331-
332-
- name: Image ${{ matrix.service[1] || '"skipped"' }}
333-
uses: ./.github/actions/build-docker
334-
if: matrix.service[1] && github.actor != 'dependabot[bot]'
335-
env:
336-
DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
337-
with:
338-
CR_USER: ${{ secrets.CR_USER }}
339-
CR_PAT: ${{ secrets.CR_PAT }}
340-
TEMP_DOCKERHUB_FIPS_USER: ${{ secrets.TEMP_DOCKERHUB_FIPS_USER }}
341-
TEMP_DOCKERHUB_FIPS_PASS: ${{ secrets.TEMP_DOCKERHUB_FIPS_PASS }}
342-
deno-version: ${{ needs.release-versions.outputs.deno-version }}
343-
arch: ${{ matrix.arch }}
344-
service: ${{ matrix.service[1] }}
345-
type: ${{ matrix.type }}
346-
publish-image: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' }}
347-
setup-docker: false
348-
349-
- name: Image ${{ matrix.service[2] || '"skipped"' }}
350-
uses: ./.github/actions/build-docker
351-
if: matrix.service[2] && github.actor != 'dependabot[bot]'
352-
env:
353-
DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
354-
with:
355-
CR_USER: ${{ secrets.CR_USER }}
356-
CR_PAT: ${{ secrets.CR_PAT }}
357-
TEMP_DOCKERHUB_FIPS_USER: ${{ secrets.TEMP_DOCKERHUB_FIPS_USER }}
358-
TEMP_DOCKERHUB_FIPS_PASS: ${{ secrets.TEMP_DOCKERHUB_FIPS_PASS }}
359-
deno-version: ${{ needs.release-versions.outputs.deno-version }}
360-
arch: ${{ matrix.arch }}
361-
service: ${{ matrix.service[2] }}
362-
type: ${{ matrix.type }}
363-
publish-image: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' }}
364-
setup-docker: false
365-
366-
- name: Image ${{ matrix.service[3] || '"skipped"' }}
367-
uses: ./.github/actions/build-docker
368-
if: matrix.service[3] && github.actor != 'dependabot[bot]'
369-
env:
370-
DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
371-
with:
372-
CR_USER: ${{ secrets.CR_USER }}
373-
CR_PAT: ${{ secrets.CR_PAT }}
374-
TEMP_DOCKERHUB_FIPS_USER: ${{ secrets.TEMP_DOCKERHUB_FIPS_USER }}
375-
TEMP_DOCKERHUB_FIPS_PASS: ${{ secrets.TEMP_DOCKERHUB_FIPS_PASS }}
376-
deno-version: ${{ needs.release-versions.outputs.deno-version }}
377-
arch: ${{ matrix.arch }}
378-
service: ${{ matrix.service[3] }}
334+
service: ${{ matrix.service }}
379335
type: ${{ matrix.type }}
380336
publish-image: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop' }}
381-
setup-docker: false
382337

383338
build-gh-docker-publish:
384339
name: 🚢 Publish Docker Images (ghcr.io)

0 commit comments

Comments
 (0)