mirror of
https://github.com/benjlevesque/short-sha.git
synced 2025-12-06 09:47:49 +01:00
Enable customization of env variable name
This commit is contained in:
17
.github/workflows/test.yml
vendored
17
.github/workflows/test.yml
vendored
@@ -18,6 +18,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: ./
|
||||
id: short-sha
|
||||
with:
|
||||
@@ -28,3 +29,19 @@ jobs:
|
||||
[ ${#SHA} -eq 6 ] && exit 0 || exit 1;
|
||||
env:
|
||||
SHA: ${{ steps.short-sha.outputs.sha }}
|
||||
- name: validate env
|
||||
run: |
|
||||
echo $SHA;
|
||||
[ ${#SHA} -eq 6 ] && exit 0 || exit 1;
|
||||
env:
|
||||
SHA: ${{ env.SHA }}
|
||||
|
||||
- uses: ./
|
||||
with:
|
||||
variable_name: "SHORT_SHA"
|
||||
- name: validate custom env
|
||||
run: |
|
||||
echo $SHORT_SHA;
|
||||
[ ${#SHA} -eq 6 ] && exit 0 || exit 1;
|
||||
env:
|
||||
SHORT_SHA: ${{ env.SHORT_SHA }}
|
||||
Reference in New Issue
Block a user