Giter VIP home page Giter VIP logo

action-get-tag's Introduction

Get Tag GitHub Action

This is a simple GitHub Action that can be used to get git-tags from the repository that the action is run in. It can be used to get a list of all git-tags in the repository or to get only the newest git-tag.

Usage

In order to return the newest git-tag, the action can be used as follows:

- name: Get Tag
  uses: cmdaltent/action-get-tag@v2
  id: get-tag
- name: Print Tag
  run: echo ${{ steps.get-tag.outputs.tag }}

In order to return all git-tags, the action can be used as follows:

- name: Get Tags
  uses: cmdaltent/action-get-tag@v2
  with:
    newest_tag_only: 'false'
  id: get-tags
- name: Print Tags
  §run: echo ${{ steps.get-tags.outputs.tags }}

Both actions need the full history of the repository to be checked out. This can be achieved as follows:

- name: Checkout repository with full history
  uses: actions/checkout@v4
  with:
    fetch-depth: 0

If only the latest commit is being checked out, the action will return an empty list [] if all tags are being fetched or an empty string '' if only the latest commit is being fetched unless the latest commit contains a valid git-tag.

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.