Skip to content

Commit

Permalink
Updated the Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
olegtarasov committed Jan 3, 2021
1 parent 2860a87 commit 53af8e1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Dead simple:

```yaml
steps:
- uses: olegtarasov/get-tag@v2
- uses: olegtarasov/get-tag@v2.1
id: tagName
with:
tagRegex: "foobar-(.*)" # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined.
Expand All @@ -23,3 +23,17 @@ Dead simple:
docker build . --file Dockerfile --tag docker.pkg.github.com/someimage:$GIT_TAG_NAME
```
You can also use named regex groups (thanks to PR from @jelgblad):
```yaml
steps:
- uses: olegtarasov/[email protected]
id: tagName
with:
tagRegex: "(?<package>.*)-(?<version>.*)"
- name: Some other step # Output usage example
with:
dirname: ${{ steps.tagName.outputs.package }}
tagname: ${{ steps.tagName.outputs.version }}
```

0 comments on commit 53af8e1

Please sign in to comment.