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

I am not able to fetch all tags #2095

Closed
tillbrodbeck-oviva opened this issue Feb 27, 2025 · 1 comment
Closed

I am not able to fetch all tags #2095

tillbrodbeck-oviva opened this issue Feb 27, 2025 · 1 comment

Comments

@tillbrodbeck-oviva
Copy link

tillbrodbeck-oviva commented Feb 27, 2025

Looking at

name: Foo Bar

on:
  push:
    branches:
      - main

jobs:
  tag-dependabot-prs:
    name: Build & Tag containers for Dependabot PR
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          fetch-tags: true

      - name: Tag changed base images
        run: |
          git fetch --prune --tags
          git tag | wc -l

Locally, using act, I am seeing 885 (all of the) tags. When I run it on GitHub online, it only gives me like 8 tags (only the current commit).

I have also tried a distinct step to fetch tags - also does not work

  - name: Fetch all tags
    run: git fetch --tags --force

This must be a bug, right? Or am I doing something wrong. Anyone has a good workaround for the moment?

@tillbrodbeck-oviva
Copy link
Author

I found out that the mistake was that for some reason on the remote I used to test less tags existed than locally. Don't know why, but that was the problem.

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