Skip to content

Commit

Permalink
get last commit sha
Browse files Browse the repository at this point in the history
  • Loading branch information
semih.cavdar committed Mar 19, 2024
1 parent 313bf04 commit 67a88f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
- name: Get previous version
id: previous_version
run: |
version=$(git show HEAD^:.github/workflows/publish.yml | awk '/tags/{print $2}' | sed 's/,$//')
commit_sha=$(git log --pretty=format:%H -n 1)
version=$(git show $commit_sha:.github/workflows/publish.yml | awk '/tags/{print $2}' | sed 's/,$//')
echo "version=$version" >> $GITHUB_ENV
- name: Use Output
Expand Down

0 comments on commit 67a88f2

Please sign in to comment.