Git Product home page Git Product logo

git-nth-last-tag's Introduction

Git nth last tag

GitHub Action that gets last git tag, or nth tag from the last one.

Inputs

skip (Optional, default: 0)

How many last commits to skip.

Outputs

tag

Retrieved tag name.

Example usage

steps:
  - uses: actions/checkout@v3
    with:
      fetch-depth: 0
  # v1.2.3
  # v1.2.4
  # v1.2.5
  # v1.2.6
  # v1.2.7 <------- skip: 3
  # v1.3.0
  # v1.3.1 <------- skip: 1
  # v1.3.2 <------- skip: 0
  - name: Get 4th tag from the last one
    id: gittagskipthree
    uses: pavelsaman/git-nth-last-tag@v1
    with:
      skip: 3
  - name: Get 2nd tag from the last one
    id: gittagskipone
    uses: pavelsaman/git-nth-last-tag@v1
    with:
      skip: 1
  - name: Get last tag
    id: gittagskipnone
    uses: pavelsaman/git-nth-last-tag@v1
  - run: echo ${{ steps.gittagskipthree.outputs.tag }} # v1.2.7
  - run: echo ${{ steps.gittagskipone.outputs.tag }}   # v1.3.1
  - run: echo ${{ steps.gittagskipnone.outputs.tag }}  # v1.3.2

Lint

git-nth-last-tag's People

Contributors

pavelsaman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.