mirror of
				https://github.com/docker/setup-buildx-action.git
				synced 2025-11-01 01:40:11 +08:00 
			
		
		
		
	Merge pull request #49 from crazy-max/bootstrap-builder
Override the configured builder instance
This commit is contained in:
		
						commit
						370507b713
					
				
							
								
								
									
										4
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @ -22,7 +22,7 @@ jobs: | |||||||
|       matrix: |       matrix: | ||||||
|         buildx-version: |         buildx-version: | ||||||
|           - latest |           - latest | ||||||
|           - v0.2.2 |           - v0.4.1 | ||||||
|           - "" |           - "" | ||||||
|     steps: |     steps: | ||||||
|       - |       - | ||||||
| @ -183,7 +183,7 @@ jobs: | |||||||
|       matrix: |       matrix: | ||||||
|         buildx-version: |         buildx-version: | ||||||
|           - latest |           - latest | ||||||
|           - v0.2.2 |           - v0.4.1 | ||||||
|           - "" |           - "" | ||||||
|         qemu-platforms: |         qemu-platforms: | ||||||
|           - all |           - all | ||||||
|  | |||||||
| @ -43,8 +43,8 @@ describe('platforms', () => { | |||||||
| 
 | 
 | ||||||
| describe('install', () => { | describe('install', () => { | ||||||
|   const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'setup-buildx-')); |   const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'setup-buildx-')); | ||||||
|   it('acquires v0.2.2 version of buildx', async () => { |   it('acquires v0.4.1 version of buildx', async () => { | ||||||
|     const buildxBin = await buildx.install('v0.2.2', tmpDir); |     const buildxBin = await buildx.install('v0.4.1', tmpDir); | ||||||
|     console.log(buildxBin); |     console.log(buildxBin); | ||||||
|     expect(fs.existsSync(buildxBin)).toBe(true); |     expect(fs.existsSync(buildxBin)).toBe(true); | ||||||
|   }, 100000); |   }, 100000); | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -557,7 +557,11 @@ function run() { | |||||||
|                 yield exec.exec('docker', createArgs); |                 yield exec.exec('docker', createArgs); | ||||||
|                 core.endGroup(); |                 core.endGroup(); | ||||||
|                 core.startGroup(`🏃 Booting builder`); |                 core.startGroup(`🏃 Booting builder`); | ||||||
|                 yield exec.exec('docker', ['buildx', 'inspect', '--bootstrap']); |                 let bootstrapArgs = ['buildx', 'inspect', '--bootstrap']; | ||||||
|  |                 if (semver.satisfies(buildxVersion, '>=0.4.0')) { | ||||||
|  |                     bootstrapArgs.push('--builder', builderName); | ||||||
|  |                 } | ||||||
|  |                 yield exec.exec('docker', bootstrapArgs); | ||||||
|                 core.endGroup(); |                 core.endGroup(); | ||||||
|             } |             } | ||||||
|             if (inputs.install) { |             if (inputs.install) { | ||||||
|  | |||||||
| @ -52,7 +52,11 @@ async function run(): Promise<void> { | |||||||
|       core.endGroup(); |       core.endGroup(); | ||||||
| 
 | 
 | ||||||
|       core.startGroup(`🏃 Booting builder`); |       core.startGroup(`🏃 Booting builder`); | ||||||
|       await exec.exec('docker', ['buildx', 'inspect', '--bootstrap']); |       let bootstrapArgs: Array<string> = ['buildx', 'inspect', '--bootstrap']; | ||||||
|  |       if (semver.satisfies(buildxVersion, '>=0.4.0')) { | ||||||
|  |         bootstrapArgs.push('--builder', builderName); | ||||||
|  |       } | ||||||
|  |       await exec.exec('docker', bootstrapArgs); | ||||||
|       core.endGroup(); |       core.endGroup(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 CrazyMax
						CrazyMax