11---
2-
32name : Build
43
54on :
1211 release :
1312 types : [edited, published]
1413 schedule :
15- - cron : ' 0 10 * * *' # everyday at 10am
14+ - cron : " 0 10 * * *" # everyday at 10am
1615 workflow_dispatch :
1716 inputs :
1817 dispatch-tag :
@@ -27,7 +26,7 @@ permissions:
2726jobs :
2827 diagnostics :
2928 name : " Diagnostics"
30- uses : felddy/reusable-workflows/.github/workflows/diagnostics.yml@v2
29+ uses : felddy/reusable-workflows/.github/workflows/diagnostics.yml@v3
3130
3231 config :
3332 name : " Config"
3635 metadata :
3736 name : " Metadata"
3837 needs : [config]
39- uses : felddy/reusable-workflows/.github/workflows/docker -metadata.yml@v2
38+ uses : felddy/reusable-workflows/.github/workflows/container -metadata.yml@v3
4039 with :
4140 image_name : ${{ needs.config.outputs.image_name }}
4241
@@ -60,15 +59,15 @@ jobs:
6059 lint :
6160 name : " Lint"
6261 needs : [config]
63- uses : felddy/reusable-workflows/.github/workflows/common-lint.yml@v2
62+ uses : felddy/reusable-workflows/.github/workflows/common-lint.yml@v3
6463
65- build-test-image :
66- name : " Build test image "
64+ build-test-container :
65+ name : " Build container for testing "
6766 needs :
6867 - config
6968 - lint
7069 - metadata
71- uses : felddy/reusable-workflows/.github/workflows/docker -build-image .yml@v2
70+ uses : felddy/reusable-workflows/.github/workflows/container -build.yml@v3
7271 with :
7372 artifact_name : ${{ needs.config.outputs.image_artifact_name_stem }}-${{ needs.config.outputs.test_platform }}
7473 build_arg_1_name : VERSION
@@ -80,32 +79,32 @@ jobs:
8079 secrets :
8180 build_arg_1_value : ${{ needs.metadata.outputs.source_version }}
8281
83- test-normal-image :
82+ test-normal-container :
8483 name : " Test image"
8584 needs :
86- - build-test-image
85+ - build-test-container
8786 - config
88- uses : felddy/reusable-workflows/.github/workflows/docker-pytest-image .yml@v2
87+ uses : felddy/reusable-workflows/.github/workflows/container-test .yml@v3
8988 with :
9089 data_artifact_name : ${{ needs.config.outputs.data_artifact_name }}
9190 data_artifact_path : ${{ needs.config.outputs.data_artifact_path }}
92- image_artifact_name : ${{ needs.build-test-image .outputs.artifact_name }}
93- image_archive_name : ${{ needs.build-test-image .outputs.image_archive_name }}
91+ image_artifact_name : ${{ needs.build-test-container .outputs.artifact_name }}
92+ image_archive_name : ${{ needs.build-test-container .outputs.image_archive_name }}
9493
9594 build-each-platform :
96- name : " Build platform "
95+ name : " Build container "
9796 needs :
9897 - config
9998 - lint
10099 - metadata
101- - test-normal-image
100+ - test-normal-container
102101 if : github.event_name != 'pull_request'
103102 strategy :
104103 matrix :
105104 platform : ${{ fromJson(needs.config.outputs.platforms_json) }}
106105 exclude :
107106 - platform : ${{ needs.config.outputs.test_platform }}
108- uses : felddy/reusable-workflows/.github/workflows/docker -build-image .yml@v2
107+ uses : felddy/reusable-workflows/.github/workflows/container -build.yml@v3
109108 with :
110109 artifact_name : ${{ needs.config.outputs.image_artifact_name_stem }}-${{ matrix.platform }}
111110 build_arg_1_name : VERSION
@@ -127,13 +126,13 @@ jobs:
127126 strategy :
128127 matrix :
129128 platform : ${{ fromJson(needs.config.outputs.platforms_json) }}
130- uses : felddy/reusable-workflows/.github/workflows/sbom-artifact .yml@v2
129+ uses : felddy/reusable-workflows/.github/workflows/container-sbom .yml@v3
131130 with :
132131 image_artifact_name : ${{ needs.config.outputs.image_artifact_name_stem }}-${{ matrix.platform }}
133132 sbom_artifact_name : ${{ needs.config.outputs.sbom_artifact_name_stem }}-${{ matrix.platform }}
134133
135134 build-multi-arch-image :
136- name : " Publish image "
135+ name : " Publish container "
137136 needs :
138137 - build-each-platform
139138 - config
@@ -142,23 +141,40 @@ jobs:
142141 if : github.event_name != 'pull_request'
143142 permissions :
144143 packages : write
145- uses : felddy/reusable-workflows/.github/workflows/docker-multi-arch-push .yml@v2
144+ uses : felddy/reusable-workflows/.github/workflows/container-publish-multiarch .yml@v3
146145 with :
147146 artifact_name_pattern : ${{ needs.config.outputs.image_artifact_name_stem }}-*
148147 image_tags : ${{ needs.metadata.outputs.image_tags }}
148+
149+ mirror-to-dockerhub :
150+ name : Mirror images to DockerHub
151+ needs :
152+ - build-multi-arch-image
153+ - config
154+ - docker-secrets
155+ - metadata
156+ if : github.event_name == 'release' && !github.event.release.prerelease
157+ permissions :
158+ contents : read
159+ packages : read
160+ uses : felddy/reusable-workflows/.github/workflows/container-mirror.yml@v3
161+ with :
162+ image_name : ${{ needs.config.outputs.image_name }}
163+ image_tag_names : ${{ needs.metadata.outputs.image_tag_names }}
164+ target_registry : docker.io
149165 secrets :
150- docker_password : ${{ secrets.DOCKER_PASSWORD }}
151- docker_username : ${{ secrets.DOCKER_USERNAME }}
166+ registry_password : ${{ secrets.DOCKER_PASSWORD }}
167+ registry_username : ${{ secrets.DOCKER_USERNAME }}
152168
153169 publish-readme :
154- name : " Publish docs"
170+ name : Publish docs to DockerHub
155171 needs :
156172 - build-multi-arch-image
157173 - config
158174 - docker-secrets
159175 - metadata
160- if : needs.metadata.outputs.latest == 'true'
161- uses : felddy/reusable-workflows/.github/workflows/docker-publish- description.yml@v2
176+ if : github.event_name == 'release' && needs.metadata.outputs.latest == 'true'
177+ uses : felddy/reusable-workflows/.github/workflows/dockerhub- description.yml@v3
162178 with :
163179 image_name : ${{ needs.config.outputs.image_name }}
164180 secrets :
0 commit comments