From 53af8e1e538a0ffab949cdde3e332d8e58e8630f Mon Sep 17 00:00:00 2001 From: Oleg Tarasov Date: Sun, 3 Jan 2021 21:29:02 +0300 Subject: [PATCH] Updated the Readme --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dfea9719..ac3c9b6b 100644 --- a/README.md +++ b/README.md @@ -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/get-tag@v2.1 + id: tagName + with: + tagRegex: "(?.*)-(?.*)" + - name: Some other step # Output usage example + with: + dirname: ${{ steps.tagName.outputs.package }} + tagname: ${{ steps.tagName.outputs.version }} +``` \ No newline at end of file