1
0
mirror of https://github.com/benjlevesque/short-sha.git synced 2025-12-06 01:37:51 +01:00
Files
short-sha/README.md
Benjamin LEVESQUE 9f96a4f558 short-sha
2020-03-09 22:00:34 +01:00

30 lines
664 B
Markdown

# Short SHA
`short-sha` is a GitHub Action than provides an output `sha` with the shortened commit SHA.
## Usage
```yaml
name: 'build-test'
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: benjlevesque/short-sha
id: short-sha
with:
length: 6
- run: echo $SHA
env:
SHA: ${{ steps.short-sha.outputs.sha }}
```
## Options
| Name | Required | Default | Description |
| ------ | -------- | ------- | ---------------------------------------- |
| length | `false` | 8 | the expected length of the shortened SHA |