From e2694b9ebd51f47cb555aa3b9b395e44cf4d4f90 Mon Sep 17 00:00:00 2001 From: Daniel Brunner Date: Sat, 18 Sep 2021 23:49:55 +0200 Subject: [PATCH] Add example workflow --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 67c520a..4ea4f3e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,27 @@ # get_latest_tag GitHub action to get the hash and name of the latest tag + +## Example workflow + +```yaml +name: Getting the tag name + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Get tag name + id: get-tag-name + uses: 0xFEEDC0DE64/get_latest_tag@main + + - name: Print tag info + run: | + echo "name of the tag is ${{ steps.get-tag-name.outputs.tag_name }}" + echo "hash of the tag is ${{ steps.get-tag-name.outputs.tag_hash }}" +``` +