add $ #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Version Verification | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
verify-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get previous version | |
id: previous_version | |
run: | | |
commit_sha=$(git log --pretty=format:%H -n 1) | |
previous_version=$(git show $commit_sha:.github/workflows/publish.yml | awk '/tags/{print $2}' | sed 's/,$//') | |
echo "previous_version=$previous_version" >> $GITHUB_ENV | |
- name: Get version | |
id: version | |
run: | | |
version=$(git show HEAD:.github/workflows/publish.yml | awk '/tags/{print $2}' | sed 's/,$//') | |
echo "version=$version" >> $GITHUB_ENV | |
- name: Use Output | |
id: output | |
run: | | |
echo "Output is $version" | |
echo "Output is $previous_version" | |