Skip to content

Allow fetch-depth to fetch tags within that depth #448

Closed
@Christewart

Description

@Christewart

I'm using github actions to push docker images to dockerhub and require tags to make sure my artifacts version is correct.

I'm using fetch-depth: 500 to avoid really long fetch times with my repo (yes, I know this is a problem on it's own).

I would expected the default behavior of the action is to checkout tags within that 500 depth limit, not use --no-tags

 /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=500 origin +cd1e2e1b5d307b7f4a2c6e49113da14cfc7b1c36:refs/remotes/origin/master

is the command that gets run

https://github.com/bitcoin-s/bitcoin-s/runs/1947728258#step:2:40

Activity

freddyrios

freddyrios commented on Mar 9, 2021

@freddyrios

Got hit by this and I don't get why no-tags is used in the first place.

Local testing shows:

  1. removing the no-tags only fetches the tags within the depth limit specified.
  2. the default of 1 commit still only pulls 1 commit (in line with the above)

Can't see the downside, just some extra metadata being pulled?

added a commit that references this issue on May 1, 2021
hairyhenderson

hairyhenderson commented on Jul 12, 2021

@hairyhenderson

I'm also seeing this behaviour with fetch-depth: 0, which contradicts what the docs say... Maybe something broke since #258?

/cc @ericsciple

RobertWieczoreck

RobertWieczoreck commented on Sep 19, 2021

@RobertWieczoreck
Contributor

I forged a pull request that fixes this issue by introducing a fetch-tags option: #579
Reviews and thumbs-ups are very welcome :)

added a commit that references this issue on Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @RobertWieczoreck@hairyhenderson@Christewart@freddyrios

      Issue actions

        Allow fetch-depth to fetch tags within that depth · Issue #448 · actions/checkout