Skip to content

Commit 53af8e1

Browse files
committed
Updated the Readme
1 parent 2860a87 commit 53af8e1

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Dead simple:
1010

1111
```yaml
1212
steps:
13-
- uses: olegtarasov/get-tag@v2
13+
- uses: olegtarasov/get-tag@v2.1
1414
id: tagName
1515
with:
1616
tagRegex: "foobar-(.*)" # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined.
@@ -23,3 +23,17 @@ Dead simple:
2323
docker build . --file Dockerfile --tag docker.pkg.github.com/someimage:$GIT_TAG_NAME
2424
2525
```
26+
27+
You can also use named regex groups (thanks to PR from @jelgblad):
28+
29+
```yaml
30+
steps:
31+
- uses: olegtarasov/get-tag@v2.1
32+
id: tagName
33+
with:
34+
tagRegex: "(?<package>.*)-(?<version>.*)"
35+
- name: Some other step # Output usage example
36+
with:
37+
dirname: ${{ steps.tagName.outputs.package }}
38+
tagname: ${{ steps.tagName.outputs.version }}
39+
```

0 commit comments

Comments
 (0)