mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2024-11-24 17:21:07 +07:00
Fixed path issues in regex strategy
This commit is contained in:
parent
dec8dcd1af
commit
b30eee1686
@ -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.`)
|
||||
|
Loading…
Reference in New Issue
Block a user