99env :
1010 OLS_VERSION : 1.7.19
1111 PHP_STABLE_VERSION : ' 8.3.2'
12+ NODE_STABLE_VERSION : ' 20'
1213 REGISTRY : ghcr.io
1314
1415jobs :
2223 - ' 8.1.27'
2324 - ' 8.2.15'
2425 - ' 8.3.2'
26+ NODE_VERSION :
27+ - ' 16'
28+ - ' 18'
29+ - ' 20'
2530
2631 steps :
2732 - name : Checkout
6368 # https://github.com/marketplace/actions/build-and-push-docker-images
6469 - name : Build and Push Docker Image
6570 uses : docker/build-push-action@v5
66- if : matrix.PHP_VERSION != env.PHP_STABLE_VERSION
71+ if : |
72+ matrix.PHP_VERSION != env.PHP_STABLE_VERSION
73+ && matrix.NODE_VERSION != env.NODE_STABLE_VERSION
6774 with :
6875 context : template
6976 platforms : linux/arm64
@@ -73,20 +80,79 @@ jobs:
7380 PHP_VERSION=${{ matrix.PHP_VERSION }}
7481 PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
7582 PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
83+ NODE_VERSION=${{ matrix.NODE_VERSION }}
7684 push : true
7785 tags : |
86+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
87+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
88+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
89+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
90+ no-cache : ${{ github.event_name == 'workflow_dispatch' && true || false }}
91+ cache-from : type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
92+ cache-to : type=inline
93+
94+ # https://github.com/marketplace/actions/build-and-push-docker-images
95+ - name : Build and Push Docker Image - latest PHP, non-latest Node
96+ uses : docker/build-push-action@v5
97+ if : |
98+ matrix.PHP_VERSION == env.PHP_STABLE_VERSION
99+ && matrix.NODE_VERSION != env.NODE_STABLE_VERSION
100+ with :
101+ context : template
102+ platforms : linux/arm64
103+ provenance : false
104+ build-args : |
105+ OLS_VERSION=${{ env.OLS_VERSION }}
106+ PHP_VERSION=${{ matrix.PHP_VERSION }}
107+ PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
108+ PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
109+ NODE_VERSION=${{ matrix.NODE_VERSION }}
110+ push : true
111+ tags : |
112+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
113+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
114+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
115+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
116+ no-cache : ${{ github.event_name == 'workflow_dispatch' && true || false }}
117+ cache-from : type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
118+ cache-to : type=inline
119+
120+ # https://github.com/marketplace/actions/build-and-push-docker-images
121+ - name : Build and Push Docker Image - latest Node, non-latest PHP
122+ uses : docker/build-push-action@v5
123+ if : |
124+ matrix.PHP_VERSION != env.PHP_STABLE_VERSION
125+ && matrix.NODE_VERSION == env.NODE_STABLE_VERSION
126+ with :
127+ context : template
128+ platforms : linux/arm64
129+ provenance : false
130+ build-args : |
131+ OLS_VERSION=${{ env.OLS_VERSION }}
132+ PHP_VERSION=${{ matrix.PHP_VERSION }}
133+ PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
134+ PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
135+ NODE_VERSION=${{ matrix.NODE_VERSION }}
136+ push : true
137+ tags : |
138+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
78139 ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
140+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
79141 ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
142+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
80143 ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
144+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
81145 ${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
82146 no-cache : ${{ github.event_name == 'workflow_dispatch' && true || false }}
83147 cache-from : type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
84148 cache-to : type=inline
85149
86150 # https://github.com/marketplace/actions/build-and-push-docker-images
87- - name : Build and Push Docker Image - latest
151+ - name : Build and Push Docker Image - latest PHP & Node
88152 uses : docker/build-push-action@v5
89- if : matrix.PHP_VERSION == env.PHP_STABLE_VERSION
153+ if : |
154+ matrix.PHP_VERSION == env.PHP_STABLE_VERSION
155+ && matrix.NODE_VERSION == env.NODE_STABLE_VERSION
90156 with :
91157 context : template
92158 platforms : linux/arm64
@@ -96,11 +162,16 @@ jobs:
96162 PHP_VERSION=${{ matrix.PHP_VERSION }}
97163 PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
98164 PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
165+ NODE_VERSION=${{ matrix.NODE_VERSION }}
99166 push : true
100167 tags : |
168+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
101169 ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
170+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
102171 ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
172+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
103173 ${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
174+ ${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
104175 ${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
105176 ${{ env.REGISTRY }}/ndigitals/openlitespeed:latest
106177 no-cache : ${{ github.event_name == 'workflow_dispatch' && true || false }}
0 commit comments