From 0f97fb6b65a325ff15c2a7237a2ef13f25eec983 Mon Sep 17 00:00:00 2001 From: sbansla <104902068+sbansla@users.noreply.github.com> Date: Mon, 22 Jan 2024 22:22:28 +0530 Subject: [PATCH] Create get_tag.yml --- .github/workflows/get_tag.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/get_tag.yml diff --git a/.github/workflows/get_tag.yml b/.github/workflows/get_tag.yml new file mode 100644 index 0000000..f41f46d --- /dev/null +++ b/.github/workflows/get_tag.yml @@ -0,0 +1,27 @@ +name: Get Tag + +on: + push: + branches: + - main + +jobs: + get-latest-tag: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Get latest tag + id: get-latest-tag + run: echo "::set-output name=tag::$(git describe --tags $(git rev-list --tags --max-count=1))" + + your-other-job: + runs-on: ubuntu-latest + + needs: get-latest-tag + + steps: + - name: Use latest tag + run: echo "Latest tag is ${{ needs.get-latest-tag.outputs.tag }}"