added build names to env

This commit is contained in:
anhefti 2021-04-22 13:42:01 +02:00
parent aa98ed6b8f
commit 1b2be41e1e

View file

@ -13,6 +13,23 @@ jobs:
maven-build:
runs-on: ubuntu-latest
steps:
-
name: Branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
-
name: Put names to env
run: |
echo $SOURCE_NAME
echo $SOURCE_BRANCH
echo $SOURCE_TAG
env:
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }}
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
-
name: Get short SHA
uses: benjlevesque/short-sha@v1.2