1
0
mirror of https://github.com/benjlevesque/short-sha.git synced 2026-07-04 07:39:20 +02:00
Francesco Ilario 09ad63594c Added @ref in uses step of gh action
Without the ref the action would throw an error.

Thank you for this nice action
2020-05-01 19:09:39 +02:00
2020-03-09 23:57:43 +01:00
2020-03-09 22:00:34 +01:00
2020-03-09 23:57:43 +01:00
2020-03-09 23:57:43 +01:00
2020-03-09 19:02:59 +01:00
2020-03-09 19:02:59 +01:00
2020-03-09 19:02:59 +01:00
2020-03-09 19:02:59 +01:00
2020-03-09 22:00:34 +01:00
2020-03-09 23:57:43 +01:00
2020-03-09 19:02:59 +01:00
2020-03-09 19:02:59 +01:00
2020-03-09 22:00:34 +01:00
2020-05-01 19:09:39 +02:00
2020-03-09 19:02:59 +01:00
2020-03-09 22:00:34 +01:00

Short SHA

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

Usage

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

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: benjlevesque/short-sha@v.1.1
        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 8 the expected length of the shortened SHA
S
Description
Github Action to shorten the git SHA1 and make it accessible in outputs
Readme MIT 967 KiB
Languages
TypeScript 83.4%
JavaScript 10.4%
Nix 6.2%