Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch-tags is not working according to the docs with v4 #1781

Open
64J0 opened this issue Jun 15, 2024 · 0 comments
Open

fetch-tags is not working according to the docs with v4 #1781

64J0 opened this issue Jun 15, 2024 · 0 comments

Comments

@64J0
Copy link

64J0 commented Jun 15, 2024

Hello, hope you're good. I'm running some experiments in order to build a custom action that demands the tags from the repo. I noticed that it was possible, in theory, just using the fetch-tags: true, but it does not work. I can only get the tags if I use the fetch-depth: 0.

Example workflow:

jobs:
  custom-action:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4
        with:
          path: tagaction
          fetch-tags: true
      - name: Try to get the tags
        run: |
          cd tagaction
          git tag --sort -creatordate

The last command (git tag --sort -creatordate) shows nothing in this case.

But, if I use the fetch-depth: 0, it lists correctly the tags from the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant