Skip to content

GitHub Action workflow to get current version or commit SHA (short).

License

Notifications You must be signed in to change notification settings

hsblhsn/version-or-commit-sha

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Version or Commit SHA

Get the version (tag) or the commit SHA of current push. This is useful for tagging docker image based on push or pull request event. It returns a short SHA if the push is not a tag push. If it's a tag push, it returns the tag itself.

Usage:

      - uses: hsblhsn/version-or-commit-sha@v1
        id: get_version
        
      - run: echo ${{ steps.get_version.outputs.VERSION_OR_COMMIT_SHA }}

About

GitHub Action workflow to get current version or commit SHA (short).

Resources

License

Stars

Watchers

Forks

Packages

No packages published