Skip to content

hudsonm62/short-sha

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Short SHA Action

A dead-simple GitHub Action to quickly get the Short SHA in your workflow.

GitHub Issues or Pull Requests CI Lint License Code Style

Usage

name: Example Workflow
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - id: short-sha
        uses: hudsonm62/short-sha@v1
      - run: echo "${{ steps.short-sha.outputs.sha }}"

Inputs

Input Default Description
commit-sha ${{ github.sha }} Full length, 40 character SHA-1
length 7 Length of the SHA to cut

Outputs

Output Description
sha The short SHA