Skip to content

Commit

Permalink
fix: commit hash tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nimish-ks committed Oct 17, 2024
1 parent 29b3e01 commit b92ee86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set version and PR flag
id: set_version
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "version=$(git rev-parse --short HEAD | cut -c 1-7)" >> $GITHUB_OUTPUT
echo "version=$(git rev-parse --short ${{ github.event.pull_request.head.sha }} | cut -c 1-7)" >> $GITHUB_OUTPUT
echo "is_pr=true" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "push" ]]; then
echo "version=latest" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit b92ee86

Please sign in to comment.