1
0
mirror of https://github.com/benjlevesque/short-sha.git synced 2025-12-06 17:57:50 +01:00

Enable customization of env variable name

This commit is contained in:
Benjamin Levesque
2023-03-19 11:36:59 +01:00
parent 07f50eae02
commit 36eb8c5309
5 changed files with 33 additions and 9 deletions

View File

@@ -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 }}