@@ -144,60 +144,8 @@ jobs:
144144 name : partial-matrix-*
145145 failOnError : false
146146
147- get-packaging-images :
148- needs : [get-environment]
149- if : |
150- needs.get-environment.outputs.skip_workflow == 'false' &&
151- needs.get-environment.outputs.stability != 'stable'
152- strategy :
153- fail-fast : false
154- max-parallel : 3
155- matrix :
156- include :
157- - image : packaging-plugins-alma8
158- - image : packaging-plugins-alma9
159- - image : packaging-plugins-alma10
160- - image : packaging-plugins-bullseye
161- - image : packaging-plugins-bookworm
162- - image : packaging-plugins-trixie
163- - image : packaging-plugins-jammy
164- - image : packaging-plugins-noble
165- - image : packaging-plugins-bullseye-arm64
166- - image : packaging-plugins-bookworm-arm64
167- - image : packaging-plugins-trixie-arm64
168- runs-on : ${{ contains(matrix.image, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
169- steps :
170- - name : Login to Registry
171- uses : docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
172- with :
173- registry : ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
174- username : ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
175- password : ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}
176-
177- - name : Login to Proxy Registry
178- uses : docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
179- with :
180- registry : ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
181- username : ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
182- password : ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}
183-
184- - name : Pull and save image
185- env :
186- DOCKER_IMAGE : ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
187- IMAGE_NAME : ${{ matrix.image }}
188- run : |
189- docker image prune -af
190- docker pull "${DOCKER_IMAGE}:latest"
191- docker save -o "./${IMAGE_NAME}" "${DOCKER_IMAGE}:latest"
192- shell : bash
193-
194- - uses : actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
195- with :
196- path : ./${{ matrix.image }}
197- key : ${{ matrix.image }}-${{ github.sha }}-${{ github.run_id }}
198-
199147 package-rpm :
200- needs : [get-environment, generate-matrices, get-packaging-images ]
148+ needs : [get-environment, generate-matrices]
201149 if : |
202150 needs.get-environment.outputs.skip_workflow == 'false' &&
203151 needs.get-environment.outputs.stability != 'stable'
@@ -213,22 +161,22 @@ jobs:
213161 steps :
214162 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
215163
216- - name : Restore packaging image from cache
217- uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5 .0.4
164+ - name : Login to GitHub Container Registry
165+ uses : docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4 .0.0
218166 with :
219- path : ./${{ matrix.image }}
220- key : ${{ matrix.image }}-${{ github.sha }}-${{ github.run_id }}
221- fail-on-cache-miss : true
167+ registry : ghcr.io
168+ username : ${{ github.actor }}
169+ password : ${{ github.token }}
222170
223- - name : Load packaging image
171+ - name : Pull packaging image from ghcr.io
224172 env :
225- IMAGE_NAME : ${{ matrix.image }}
226- run : docker load --input "./${IMAGE_NAME }"
173+ GHCR_IMAGE : ghcr.io/ ${{ github.repository }}/${{ matrix.image }}:latest
174+ run : docker pull "${GHCR_IMAGE }"
227175 shell : bash
228176
229177 - if : ${{ matrix.spec_file == '' }}
230178 env :
231- DOCKER_IMAGE : ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
179+ DOCKER_IMAGE : ghcr.io/ ${{ github.repository }}/${{ matrix.image }}:latest
232180 VERSION : ${{ matrix.version || matrix.cpan_version }}
233181 RPM_DEPENDENCIES : ${{ matrix.rpm_dependencies }}
234182 RPM_PROVIDES : ${{ matrix.rpm_provides }}
@@ -246,20 +194,20 @@ jobs:
246194 -e VERSION -e RPM_DEPENDENCIES -e RPM_PROVIDES \
247195 -e NO_AUTO_DEPENDS -e PREINSTALL_CPANLIBS -e PREINSTALL_PACKAGES \
248196 -e PKG_NAME -e PKG_EXT -e DISTRIB -e REVISION \
249- "${DOCKER_IMAGE}:latest " \
197+ "${DOCKER_IMAGE}" \
250198 bash .github/scripts/perl-cpan-libraries/package-cpan-rpm.sh
251199 shell : bash
252200
253201 - if : ${{ matrix.spec_file != '' }}
254202 env :
255- DOCKER_IMAGE : ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
203+ DOCKER_IMAGE : ghcr.io/ ${{ github.repository }}/${{ matrix.image }}:latest
256204 SPEC_FILE : ${{ matrix.spec_file }}
257205 run : |
258206 docker run --rm \
259207 -v "$(pwd):/work" \
260208 --workdir /work \
261209 -e SPEC_FILE \
262- "${DOCKER_IMAGE}:latest " \
210+ "${DOCKER_IMAGE}" \
263211 bash -c '
264212 mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
265213 rpmbuild --undefine=_disable_source_fetch -ba "$SPEC_FILE"
@@ -349,7 +297,7 @@ jobs:
349297 key : ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
350298
351299 package-deb :
352- needs : [get-environment, generate-matrices, get-packaging-images ]
300+ needs : [get-environment, generate-matrices]
353301 if : |
354302 needs.get-environment.outputs.skip_workflow == 'false' &&
355303 needs.get-environment.outputs.stability != 'stable'
@@ -364,17 +312,17 @@ jobs:
364312 steps :
365313 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
366314
367- - name : Restore packaging image from cache
368- uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5 .0.4
315+ - name : Login to GitHub Container Registry
316+ uses : docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4 .0.0
369317 with :
370- path : ./${{ matrix.image }}
371- key : ${{ matrix.image }}-${{ github.sha }}-${{ github.run_id }}
372- fail-on-cache-miss : true
318+ registry : ghcr.io
319+ username : ${{ github.actor }}
320+ password : ${{ github.token }}
373321
374- - name : Load packaging image
322+ - name : Pull packaging image from ghcr.io
375323 env :
376- IMAGE_NAME : ${{ matrix.image }}
377- run : docker load --input "./${IMAGE_NAME }"
324+ GHCR_IMAGE : ghcr.io/ ${{ github.repository }}/${{ matrix.image }}:latest
325+ run : docker pull "${GHCR_IMAGE }"
378326 shell : bash
379327
380328 - name : Parse distrib name
@@ -385,7 +333,7 @@ jobs:
385333
386334 - if : ${{ matrix.use_dh_make_perl == 'false' }}
387335 env :
388- DOCKER_IMAGE : ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
336+ DOCKER_IMAGE : ghcr.io/ ${{ github.repository }}/${{ matrix.image }}:latest
389337 VERSION : ${{ matrix.version || matrix.cpan_version }}
390338 DEB_DEPENDENCIES : ${{ matrix.deb_dependencies }}
391339 DEB_PROVIDES : ${{ matrix.deb_provides }}
@@ -406,13 +354,13 @@ jobs:
406354 -e NO_AUTO_DEPENDS -e PREINSTALL_CPANLIBS -e PREINSTALL_PACKAGES \
407355 -e PKG_NAME -e PKG_EXT -e DISTRIB -e REVISION \
408356 -e DISTRIB_SEPARATOR -e DISTRIB_SUFFIX \
409- "${DOCKER_IMAGE}:latest " \
357+ "${DOCKER_IMAGE}" \
410358 bash .github/scripts/perl-cpan-libraries/package-cpan-deb-fpm.sh
411359 shell : bash
412360
413361 - if : ${{ matrix.use_dh_make_perl == 'true' }}
414362 env :
415- DOCKER_IMAGE : ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
363+ DOCKER_IMAGE : ghcr.io/ ${{ github.repository }}/${{ matrix.image }}:latest
416364 VERSION : ${{ matrix.version || matrix.cpan_version }}
417365 PREINSTALL_CPANLIBS : ${{ matrix.preinstall_cpanlibs }}
418366 PREINSTALL_PACKAGES : ${{ matrix.preinstall_packages }}
@@ -428,7 +376,7 @@ jobs:
428376 -e VERSION -e PREINSTALL_CPANLIBS -e PREINSTALL_PACKAGES \
429377 -e PKG_NAME -e DISTRIB -e REVISION \
430378 -e DISTRIB_SEPARATOR -e DISTRIB_SUFFIX \
431- "${DOCKER_IMAGE}:latest " \
379+ "${DOCKER_IMAGE}" \
432380 bash .github/scripts/perl-cpan-libraries/package-cpan-deb-dhmaker.sh
433381 shell : bash
434382
0 commit comments