Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.17 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.17 KB

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