generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2860a87
commit 53af8e1
Showing
1 changed file
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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 }} | ||
``` |