8000 GitHub - singlestore/actions-short-sha: Github Action to shorten the git SHA1 and make it accessible in outputs
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

singlestore/actions-short-sha

 
 

Repository files navigation

Short SHA

short-sha is a GitHub Action than provides an output sha with the shortened commit SHA.

Usage

You can access the shortened value with either ${{ steps.short-sha.outputs.sha }} (short-sha being the name of the action step) or ${{ env.SHA }}.

name: 'build-test'
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: benjlevesque/short-sha@v3.0
        id: short-sha
        with:
          length: 6
      - run: echo $SHA
        env:
          SHA: ${{ steps.short-sha.outputs.sha }}
      - run: echo $SHA
        env:
          SHA: ${{ env.SHA }}

Options

Name Required Default Description
length false 7 the expected length of the shortened SHA
variable_name false SHA the name of the exported env variable

About

Github Action to shorten the git SHA1 and make it accessible in outputs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 88.9%
  • JavaScript 11.1%
0