mirror of
				https://github.com/ButlerLogic/action-autotag.git
				synced 2025-10-31 07:16:25 +07:00 
			
		
		
		
	Added environment variable support for GITHUB_TOKEN
This commit is contained in:
		| @ -28,12 +28,14 @@ async function run() { | ||||
|     core.debug(` Detected version ${pkg.version}`) | ||||
|  | ||||
|     if (!process.env.hasOwnProperty('INPUT_GITHUB_TOKEN') || process.env.INPUT_GITHUB_TOKEN.trim().length === 0) { | ||||
|       core.setFailed('Invalid or missing GITHUB_TOKEN.') | ||||
|       return | ||||
|       if (!process.env.hasOwnProperty('GITHUB_TOKEN')) { | ||||
|         core.setFailed('Invalid or missing GITHUB_TOKEN.') | ||||
|         return | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     // Check for existing tag | ||||
|     const git = new github.GitHub(process.env.INPUT_GITHUB_TOKEN) | ||||
|     const git = new github.GitHub(process.env.INPUT_GITHUB_TOKEN || process.env.GITHUB_TOKEN) | ||||
|     const owner = process.env.GITHUB_ACTOR | ||||
|     const repo = process.env.GITHUB_REPOSITORY.split('/').pop() | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Corey Butler
					Corey Butler