mirror of
				https://github.com/ButlerLogic/action-autotag.git
				synced 2025-10-31 07:16:25 +07:00 
			
		
		
		
	Fixed path issues in regex strategy
This commit is contained in:
		| @ -6,7 +6,7 @@ import core from '@actions/core' | ||||
| export default class Dockerfile extends Regex { | ||||
|   constructor (root = null) { | ||||
|     root = path.join(process.env.GITHUB_WORKSPACE, root) | ||||
|     core.debug(fs.readdirSync(root)) | ||||
|  | ||||
|     if (fs.statSync(root).isDirectory()) { | ||||
|       root = path.join(root, 'Dockerfile') | ||||
|     } | ||||
|  | ||||
| @ -2,8 +2,8 @@ import fs from 'fs' | ||||
| import path from 'path' | ||||
|  | ||||
| export default class Regex { | ||||
|   constructor (root = null, pattern) { | ||||
|     root = path.join(process.env.GITHUB_WORKSPACE, root) | ||||
|   constructor (root = './', pattern) { | ||||
|     root = path.resolve(root) | ||||
|  | ||||
|     if (fs.statSync(root).isDirectory()) { | ||||
|       throw new Error(`${root} is a directory. The Regex tag identification strategy requires a file.`) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Corey Butler
					Corey Butler