mirror of https://github.com/actions/setup-go.git
				
				
				
			add restore-only
This commit is contained in:
		
							parent
							
								
									8e57b58e57
								
							
						
					
					
						commit
						481f18bdd4
					
				|  | @ -15,6 +15,9 @@ inputs: | ||||||
|   cache: |   cache: | ||||||
|     description: Used to specify whether caching is needed. Set to true, if you'd like to enable caching. |     description: Used to specify whether caching is needed. Set to true, if you'd like to enable caching. | ||||||
|     default: true |     default: true | ||||||
|  |   restore-only: | ||||||
|  |     description: Do not save the cache. Only applies if cache is enabled. | ||||||
|  |     default: false | ||||||
|   cache-dependency-path: |   cache-dependency-path: | ||||||
|     description: 'Used to specify the path to a dependency file - go.sum' |     description: 'Used to specify the path to a dependency file - go.sum' | ||||||
|   architecture: |   architecture: | ||||||
|  |  | ||||||
|  | @ -18,7 +18,8 @@ process.on('uncaughtException', e => { | ||||||
| export async function run(earlyExit?: boolean) { | export async function run(earlyExit?: boolean) { | ||||||
|   try { |   try { | ||||||
|     const cacheInput = core.getBooleanInput('cache'); |     const cacheInput = core.getBooleanInput('cache'); | ||||||
|     if (cacheInput) { |     const restoreOnly = core.getBooleanInput('restoreOnly'); | ||||||
|  |     if (cacheInput && !restoreOnly) { | ||||||
|       await cachePackages(); |       await cachePackages(); | ||||||
| 
 | 
 | ||||||
|       if (earlyExit) { |       if (earlyExit) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	![github-actions[bot]@users.noreply.github.com](/assets/img/avatar_default.png) github-actions[bot]
						github-actions[bot]