Skip to content

Commit

Permalink
Update env-variable-test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
riprasad committed Feb 7, 2022
1 parent 98b9ab2 commit 101e6c4
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/env-variable-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ jobs:
echo "RELEASE_VERSION=${{ github.event.inputs.release-version }}" >> $GITHUB_ENV
echo "BRANCH_NAME=${{ github.event.inputs.branch-name }}" >> $GITHUB_ENV
- name: Print TAG_NAME
run: echo $TAG_NAME
- name: Print ENV variable
run: |
echo "${{ github.event.release.name }}"
echo "${{ github.event.release.target_commitish }}"
echo "${{ github.event.inputs.release-version }}"
echo "${{ github.event.inputs.branch-name }}"
echo "$RELEASE_VERSION"
echo "$BRANCH_NAME"
alternate-way:
runs-on: ubuntu-latest
Expand All @@ -39,9 +45,22 @@ jobs:
set -x
if [ -z "${{github.event.inputs.release-version}}" ] || [ -z "${{github.event.inputs.branch-name}}" ]
then
echo "************************************************************************"
echo "RELEASE_VERSION=${{ github.event.release.name }}" >> $GITHUB_ENV
echo "BRANCH_NAME=${{ github.event.release.target_commitish }}" >> $GITHUB_ENV
echo "************************************************************************"
else
echo "=========================================================================="
echo "RELEASE_VERSION=${{ github.event.inputs.release-version }}" >> $GITHUB_ENV
echo "BRANCH_NAME=${{ github.event.inputs.branch-name }}" >> $GITHUB_ENV
echo "=========================================================================="
fi
- name: print ENV variable
run: |
echo "${{ github.event.release.name }}"
echo "${{ github.event.release.target_commitish }}"
echo "${{ github.event.inputs.release-version }}"
echo "${{ github.event.inputs.branch-name }}"
echo "$RELEASE_VERSION"
echo "$BRANCH_NAME"

0 comments on commit 101e6c4

Please sign in to comment.