mirror of
https://github.com/benjlevesque/short-sha.git
synced 2026-03-08 05:14:53 +01:00
short-sha
This commit is contained in:
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
@@ -10,14 +10,21 @@ jobs:
|
||||
build: # make sure build/ci work properly
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
npm install
|
||||
npm run all
|
||||
test: # make sure the action works on a clean machine without building
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
id: short-sha
|
||||
with:
|
||||
milliseconds: 1000
|
||||
length: 6
|
||||
- name: validate output
|
||||
run: |
|
||||
echo $SHA;
|
||||
[ ${#SHA} -eq 6 ] && exit 0 || exit 1;
|
||||
env:
|
||||
SHA: ${{ steps.short-sha.outputs.sha }}
|
||||
|
||||
Reference in New Issue
Block a user