Skip to content

Commit 63861bb

Browse files
authored
Merge pull request #63 from rspier/bookworm2
2 parents 13724ed + d13ed00 commit 63861bb

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed

.github/workflows/publish-to-docker.yml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111

1212
jobs:
13-
prepare-matrix:
13+
prepare-matrix-buster:
1414
runs-on: ubuntu-latest
1515
name: List perl versions
1616
outputs:
@@ -23,6 +23,20 @@ jobs:
2323
since-perl: '5.8'
2424
with-devel: 'true'
2525

26+
# bookworm base images only exist for 5.36 and newer.
27+
prepare-matrix-bookworm:
28+
runs-on: ubuntu-latest
29+
name: List perl versions
30+
outputs:
31+
perl-versions: ${{ steps.action.outputs.perl-versions }}
32+
steps:
33+
- name: Perl versions action step
34+
id: action
35+
uses: perl-actions/perl-versions@main
36+
with:
37+
since-perl: '5.36'
38+
with-devel: 'true'
39+
2640
latest-build:
2741
name: "Build latest"
2842
runs-on: ubuntu-latest
@@ -43,18 +57,38 @@ jobs:
4357
buildargs: BASE=buster
4458
tags: "latest,${{ matrix.debian-version }}"
4559

46-
build:
47-
name: "Build versions"
60+
build-buster:
61+
name: "Build versions for buster"
4862
runs-on: ubuntu-latest
4963
needs:
50-
- prepare-matrix
64+
- prepare-matrix-buster
5165

5266
strategy:
5367
fail-fast: false
5468
matrix:
55-
perl-version: ${{ fromJson (needs.prepare-matrix.outputs.perl-versions) }}
56-
debian-version: [buster,bookworm]
69+
perl-version: ${{ fromJson (needs.prepare-matrix-buster.outputs.perl-versions) }}
70+
steps:
71+
- uses: actions/checkout@v4
72+
- name: Publish to Registry
73+
uses: elgohr/Publish-Docker-Github-Action@v5
74+
with:
75+
name: ${{ secrets.DOCKER_REPO }}
76+
username: ${{ secrets.DOCKER_USERNAME }}
77+
password: ${{ secrets.DOCKER_GITHUB_TOKEN }}
78+
dockerfile: Dockerfile
79+
buildargs: BASE=${{ matrix.perl-version }}-buster,CPANOUTDATED=${{ matrix.perl-version != '5.8' }}
80+
tags: "${{ matrix.perl-version }}-buster,${{ matrix-perl-version }}"
5781

82+
build-bookworm:
83+
name: "Build versions for bookworm"
84+
runs-on: ubuntu-latest
85+
needs:
86+
- prepare-matrix-bookworm
87+
88+
strategy:
89+
fail-fast: false
90+
matrix:
91+
perl-version: ${{ fromJson (needs.prepare-matrix-bookworm.outputs.perl-versions) }}
5892
steps:
5993
- uses: actions/checkout@v4
6094
- name: Publish to Registry
@@ -64,5 +98,5 @@ jobs:
6498
username: ${{ secrets.DOCKER_USERNAME }}
6599
password: ${{ secrets.DOCKER_GITHUB_TOKEN }}
66100
dockerfile: Dockerfile
67-
buildargs: BASE=${{ matrix.perl-version }}-${{ matrix.debian-version }},CPANOUTDATED=${{ matrix.perl-version != '5.8' }}
68-
tags: "${{ matrix.perl-version }}-${{ matrix.debian-version }}${{ matrix.debian-version=='buster' && format(',{0}',matrix.perl-version) || '' }}"
101+
buildargs: BASE=${{ matrix.perl-version }}-bookworm,CPANOUTDATED=${{ matrix.perl-version != '5.8' }}
102+
tags: "${{ matrix.perl-version }}-bookworm"

0 commit comments

Comments
 (0)