Skip to content

[bug] 'fetch-depth: 0' always miss current tag #1190

@Freed-Wu

Description

@Freed-Wu
"on":
  push:
    paths-ignore:
      - "**.md"
  pull_request:
    paths-ignore:
      - "**.md"
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

Then

git tag 0.0.3
git push --tags

Expected: in CI machine, git describe will return 0.0.3
Actual: 0.0.2-1-ged78cae

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions