mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2024-11-22 08:11:07 +07:00
Add pattern warning.
This commit is contained in:
parent
a825539276
commit
e514b01d25
@ -140,7 +140,7 @@ The pattern described in this example is a simple one used. If you need a more c
|
||||
|
||||
`^((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$`
|
||||
|
||||
As of `1.0.3`, JavaScript named patterns are supported, where the group named `version` will be used to populate the tag. For example:
|
||||
As of `1.1.2`, JavaScript named patterns are supported, where the group named `version` will be used to populate the tag. For example:
|
||||
|
||||
```yaml
|
||||
- uses: butlerlogic/action-autotag@1.0.0
|
||||
|
@ -34,7 +34,9 @@ async function run () {
|
||||
break
|
||||
|
||||
case 'regex':
|
||||
version = (new Regex(root, new RegExp(core.getInput('regex_pattern', { required: false }), 'i'))).version
|
||||
const pattern = core.getInput('regex_pattern', { required: false })
|
||||
core.warning(`Using /${pattern}/gim custom version identification pattern.`)
|
||||
version = (new Regex(root, new RegExp(pattern, 'gim'))).version
|
||||
break
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user