Skip to content

Commit

Permalink
Update fetch depth
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-abblix committed Jul 9, 2024
1 parent c7c4b84 commit 7df11c8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@ jobs:
version: ${{ steps.get_version.outputs.version }}
steps:
- uses: actions/checkout@v4.1.2
with:
fetch-depth: 0 # Fetch all history and tags
- name: Debug - List tags
run: git tag -l
- name: Debug - Show commits
run: git log --oneline
- name: Get latest tag
id: get_version
run: echo "version=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV

run: |
tag=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "v0.0.1")
echo "version=$tag" >> $GITHUB_ENV
echo "::set-output name=version::$tag"
echo "Resolved version: $tag"
build:
needs: get_version
runs-on: ubuntu-latest
Expand Down

0 comments on commit 7df11c8

Please sign in to comment.