mirror of
				https://git.mirrors.martin98.com/https://github.com/docker/setup-docker-action
				synced 2025-10-30 23:21:04 +08:00 
			
		
		
		
	Merge pull request #57 from crazy-max/sock-output
sock output to get docker socket path
This commit is contained in:
		
						commit
						38c07112bd
					
				
							
								
								
									
										4
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @ -13,7 +13,7 @@ on: | |||||||
|   pull_request: |   pull_request: | ||||||
| 
 | 
 | ||||||
| env: | env: | ||||||
|   DOCKER_VERSION: v23.0.6 |   DOCKER_VERSION: v24.0.9 | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   main: |   main: | ||||||
| @ -67,7 +67,7 @@ jobs: | |||||||
|         name: Set up Docker |         name: Set up Docker | ||||||
|         uses: ./ |         uses: ./ | ||||||
|         with: |         with: | ||||||
|           version: v23.0.0-rc.4 |           version: v24.0.0-rc.4 | ||||||
|           channel: test |           channel: test | ||||||
|       - |       - | ||||||
|         name: Dump context |         name: Dump context | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ ___ | |||||||
|   * [Define custom `limactl start` arguments (macOS)](#define-custom-limactl-start-arguments-macos) |   * [Define custom `limactl start` arguments (macOS)](#define-custom-limactl-start-arguments-macos) | ||||||
| * [Customizing](#customizing) | * [Customizing](#customizing) | ||||||
|   * [inputs](#inputs) |   * [inputs](#inputs) | ||||||
|  |   * [outputs](#outputs) | ||||||
| * [Contributing](#contributing) | * [Contributing](#contributing) | ||||||
| * [License](#license) | * [License](#license) | ||||||
| 
 | 
 | ||||||
| @ -106,6 +107,14 @@ The following inputs can be used as `step.with` keys | |||||||
| | `daemon-config` | String |                       | [Docker daemon JSON configuration](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file) | | | `daemon-config` | String |                       | [Docker daemon JSON configuration](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file) | | ||||||
| | `context`       | String | `setup-docker-action` | Docker context name.                                                                                                        | | | `context`       | String | `setup-docker-action` | Docker context name.                                                                                                        | | ||||||
| 
 | 
 | ||||||
|  | ### outputs | ||||||
|  | 
 | ||||||
|  | The following outputs are available | ||||||
|  | 
 | ||||||
|  | | Name   | Type   | Description        | | ||||||
|  | |--------|--------|--------------------| | ||||||
|  | | `sock` | String | Docker socket path | | ||||||
|  | 
 | ||||||
| ## Contributing | ## Contributing | ||||||
| 
 | 
 | ||||||
| Want to contribute? Awesome! The most basic way to show your support is to star | Want to contribute? Awesome! The most basic way to show your support is to star | ||||||
|  | |||||||
| @ -17,10 +17,10 @@ describe('getInputs', () => { | |||||||
|     [ |     [ | ||||||
|       0, |       0, | ||||||
|       new Map<string, string>([ |       new Map<string, string>([ | ||||||
|         ['version', 'v23.0.1'], |         ['version', 'v24.0.8'], | ||||||
|       ]), |       ]), | ||||||
|       { |       { | ||||||
|         version: 'v23.0.1', |         version: 'v24.0.8', | ||||||
|         channel: '', |         channel: '', | ||||||
|         context: '', |         context: '', | ||||||
|         daemonConfig: '', |         daemonConfig: '', | ||||||
| @ -29,13 +29,13 @@ describe('getInputs', () => { | |||||||
|     [ |     [ | ||||||
|       1, |       1, | ||||||
|       new Map<string, string>([ |       new Map<string, string>([ | ||||||
|         ['version', 'v23.0.0-rc.4'], |         ['version', 'v24.0.0-rc.4'], | ||||||
|         ['channel', 'test'], |         ['channel', 'test'], | ||||||
|         ['context', 'foo'], |         ['context', 'foo'], | ||||||
|         ['daemon-config', `{"debug":true,"features":{"containerd-snapshotter":true}}`], |         ['daemon-config', `{"debug":true,"features":{"containerd-snapshotter":true}}`], | ||||||
|       ]), |       ]), | ||||||
|       { |       { | ||||||
|         version: 'v23.0.0-rc.4', |         version: 'v24.0.0-rc.4', | ||||||
|         channel: 'test', |         channel: 'test', | ||||||
|         context: 'foo', |         context: 'foo', | ||||||
|         daemonConfig: `{"debug":true,"features":{"containerd-snapshotter":true}}`, |         daemonConfig: `{"debug":true,"features":{"containerd-snapshotter":true}}`, | ||||||
|  | |||||||
| @ -8,7 +8,7 @@ branding: | |||||||
| 
 | 
 | ||||||
| inputs: | inputs: | ||||||
|   version: |   version: | ||||||
|     description: 'Docker CE version. (e.g, v23.0.1)' |     description: 'Docker CE version. (e.g, v24.0.9)' | ||||||
|     required: false |     required: false | ||||||
|     default: 'latest' |     default: 'latest' | ||||||
|   channel: |   channel: | ||||||
| @ -21,6 +21,10 @@ inputs: | |||||||
|     description: 'Docker context name. (default setup-docker-action)' |     description: 'Docker context name. (default setup-docker-action)' | ||||||
|     required: false |     required: false | ||||||
| 
 | 
 | ||||||
|  | outputs: | ||||||
|  |   sock: | ||||||
|  |     description: "Docker socket path" | ||||||
|  | 
 | ||||||
| runs: | runs: | ||||||
|   using: 'node20' |   using: 'node20' | ||||||
|   main: 'dist/index.js' |   main: 'dist/index.js' | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -34,7 +34,11 @@ actionsToolkit.run( | |||||||
|     } |     } | ||||||
|     if (toolDir) { |     if (toolDir) { | ||||||
|       stateHelper.setRunDir(runDir); |       stateHelper.setRunDir(runDir); | ||||||
|       await install.install(); |       const sockPath = await install.install(); | ||||||
|  |       await core.group(`Setting outputs`, async () => { | ||||||
|  |         core.info(`sock=${sockPath}`); | ||||||
|  |         core.setOutput('sock', sockPath); | ||||||
|  |       }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     await core.group(`Docker info`, async () => { |     await core.group(`Docker info`, async () => { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 CrazyMax
						CrazyMax