mirror of
				https://github.com/ButlerLogic/action-autotag.git
				synced 2025-10-31 07:16:25 +07:00 
			
		
		
		
	Removed irrelevant repo variable
This commit is contained in:
		
							
								
								
									
										16
									
								
								lib/main.js
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								lib/main.js
									
									
									
									
									
								
							| @ -6,8 +6,6 @@ const os = require('os') | ||||
|  | ||||
| async function run() { | ||||
|   try { | ||||
|     const { repo } = github.context | ||||
|  | ||||
|     core.debug( | ||||
|       ` Available environment variables:\n -> ${Object.keys(process.env) | ||||
|         .map(i => i + ' :: ' + process.env[i]) | ||||
| @ -23,6 +21,13 @@ async function run() { | ||||
|  | ||||
|     core.debug(` Working Directory: ${process.env.GITHUB_WORKSPACE}:\n${dir}`) | ||||
|  | ||||
|     if (!process.env.hasOwnProperty('INPUT_GITHUB_TOKEN') || process.env.INPUT_GITHUB_TOKEN.trim().length === 0) { | ||||
|       if (!process.env.hasOwnProperty('GITHUB_TOKEN')) { | ||||
|         core.setFailed('Invalid or missing GITHUB_TOKEN.') | ||||
|         return | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     const pkg_root = core.getInput('package_root', { required: false }) | ||||
|     const pkgfile = path.join(process.env.GITHUB_WORKSPACE, pkg_root, 'package.json') | ||||
|     if (!fs.existsSync(pkgfile)) { | ||||
| @ -63,13 +68,6 @@ async function run() { | ||||
| //     core.debug(` Detected version ${version}`) | ||||
|  | ||||
|  | ||||
|     if (!process.env.hasOwnProperty('INPUT_GITHUB_TOKEN') || process.env.INPUT_GITHUB_TOKEN.trim().length === 0) { | ||||
|       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 || process.env.GITHUB_TOKEN) | ||||
|     const owner = process.env.GITHUB_ACTOR | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Corey Butler
					Corey Butler