Skip to content

Commit 101e6c4

Browse files
authored
Update env-variable-test.yaml
1 parent 98b9ab2 commit 101e6c4

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/env-variable-test.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ jobs:
2828
echo "RELEASE_VERSION=${{ github.event.inputs.release-version }}" >> $GITHUB_ENV
2929
echo "BRANCH_NAME=${{ github.event.inputs.branch-name }}" >> $GITHUB_ENV
3030
31-
- name: Print TAG_NAME
32-
run: echo $TAG_NAME
31+
- name: Print ENV variable
32+
run: |
33+
echo "${{ github.event.release.name }}"
34+
echo "${{ github.event.release.target_commitish }}"
35+
echo "${{ github.event.inputs.release-version }}"
36+
echo "${{ github.event.inputs.branch-name }}"
37+
echo "$RELEASE_VERSION"
38+
echo "$BRANCH_NAME"
3339
3440
alternate-way:
3541
runs-on: ubuntu-latest
@@ -39,9 +45,22 @@ jobs:
3945
set -x
4046
if [ -z "${{github.event.inputs.release-version}}" ] || [ -z "${{github.event.inputs.branch-name}}" ]
4147
then
48+
echo "************************************************************************"
4249
echo "RELEASE_VERSION=${{ github.event.release.name }}" >> $GITHUB_ENV
4350
echo "BRANCH_NAME=${{ github.event.release.target_commitish }}" >> $GITHUB_ENV
51+
echo "************************************************************************"
4452
else
53+
echo "=========================================================================="
4554
echo "RELEASE_VERSION=${{ github.event.inputs.release-version }}" >> $GITHUB_ENV
4655
echo "BRANCH_NAME=${{ github.event.inputs.branch-name }}" >> $GITHUB_ENV
56+
echo "=========================================================================="
4757
fi
58+
59+
- name: print ENV variable
60+
run: |
61+
echo "${{ github.event.release.name }}"
62+
echo "${{ github.event.release.target_commitish }}"
63+
echo "${{ github.event.inputs.release-version }}"
64+
echo "${{ github.event.inputs.branch-name }}"
65+
echo "$RELEASE_VERSION"
66+
echo "$BRANCH_NAME"

0 commit comments

Comments
 (0)