Last updated 8 months ago
Environment Variables can be specified in the following format:
echo "{environment_variable_name}={value}" >> $GITHUB_ENV
steps: - name: Setting the environment variable run: | echo "GIT_VERSION=$(git --version)" >> $GITHUB_ENV - name: Check Git version run: | echo "${GIT_VERSION}"
Note: Can also use ${{ env.GIT_VERSION }} format to get the environment variable value.
${{ env.GIT_VERSION }}
Source: