File tree Expand file tree Collapse file tree
actions/version-matrix/src/matrices Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ const imageNames = [
7373 'node-playwright-camoufox' ,
7474] as const ;
7575
76+ // Images that require Chrome/Chromium cannot be built for arm64 on Linux
77+ const arm64UnsupportedImages : ReadonlySet < string > = new Set ( [
78+ 'node-playwright' ,
79+ 'node-playwright-chrome' ,
80+ ] ) ;
81+
7682const matrix = {
7783 include : [ ] as {
7884 'image-name' : ( typeof imageNames ) [ number ] ;
@@ -83,6 +89,7 @@ const matrix = {
8389 'camoufox-version' : string ;
8490 'is-latest' : 'true' | 'false' ;
8591 'latest-node-version' : string ;
92+ 'supports-arm64' : 'true' | 'false' ;
8693 } [ ] ,
8794} ;
8895
@@ -98,6 +105,7 @@ for (const nodeVersion of supportedNodeVersions) {
98105 'camoufox-version' : `^${ latestCamoufoxVersion } ` ,
99106 'is-latest' : playwrightVersion === latestPlaywrightVersion ? 'true' : 'false' ,
100107 'latest-node-version' : latestNodeVersion ,
108+ 'supports-arm64' : arm64UnsupportedImages . has ( imageName ) ? 'false' : 'true' ,
101109 } ) ;
102110 }
103111 }
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ const imageNames = [
6868 'python-playwright-camoufox' ,
6969] as const ;
7070
71+ // Images that require Chrome/Chromium cannot be built for arm64 on Linux
72+ const arm64UnsupportedImages : ReadonlySet < string > = new Set ( [
73+ 'python-playwright' ,
74+ 'python-playwright-chrome' ,
75+ ] ) ;
76+
7177const matrix = {
7278 include : [ ] as {
7379 'image-name' : ( typeof imageNames ) [ number ] ;
@@ -76,6 +82,7 @@ const matrix = {
7682 'camoufox-version' : string ;
7783 'is-latest' : 'true' | 'false' ;
7884 'latest-python-version' : string ;
85+ 'supports-arm64' : 'true' | 'false' ;
7986 } [ ] ,
8087} ;
8188
@@ -99,6 +106,7 @@ for (const pythonVersion of supportedPythonVersions) {
99106 'camoufox-version' : latestCamoufoxVersion ,
100107 'is-latest' : playwrightVersion === latestPlaywrightVersion ? 'true' : 'false' ,
101108 'latest-python-version' : latestPythonVersion ,
109+ 'supports-arm64' : arm64UnsupportedImages . has ( imageName ) ? 'false' : 'true' ,
102110 } ) ;
103111 }
104112 }
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ jobs:
256256 build-args : |
257257 NODE_VERSION=${{ matrix.node-version }}
258258 PLAYWRIGHT_VERSION=${{ format('v{0}-', matrix.playwright-version) }}
259- platforms : linux/amd64 ${{ ( matrix.image-name != 'node-playwright' && matrix.image-name ! = 'node-playwright-chrome ' && ',linux/arm64') || '' }}
259+ platforms : ${{ matrix.supports-arm64 = = 'true ' && 'linux/amd64 ,linux/arm64' || 'linux/amd64 ' }}
260260 provenance : true
261261 push : true
262262 tags : ${{ fromJson(steps.prepare-tags.outputs.result).allTags }}
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ jobs:
216216 PYTHON_VERSION=${{ matrix.python-version }}
217217 PLAYWRIGHT_VERSION=${{ matrix.playwright-version }}
218218 CAMOUFOX_VERSION=${{ matrix.camoufox-version }}
219- platforms : linux/amd64 ${{ ( matrix.image-name != 'python-playwright' && matrix.image-name ! = 'python-playwright-chrome ' && ',linux/arm64') || '' }}
219+ platforms : ${{ matrix.supports-arm64 = = 'true ' && 'linux/amd64 ,linux/arm64' || 'linux/amd64 ' }}
220220 provenance : true
221221 push : true
222222 tags : ${{ fromJson(steps.prepare-tags.outputs.result).allTags }}
You can’t perform that action at this time.
0 commit comments