A dead-simple GitHub Action to quickly get the Short SHA in your workflow.
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 }}"
Input | Default | Description |
---|---|---|
commit-sha |
${{ github.sha }} |
Full length, 40 character SHA-1 |
length |
7 |
Length of the SHA to cut |
Output | Description |
---|---|
sha |
The short SHA |