Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 2

Checkout Action does not create local master and has no options for Tags breaking GitVersion

The checkout action cannot be configured so that it ensure the presence of a local master branch.

Also it forces the --no-tags option, while there should be the possibility to get a repo tags.

Without these two (master branch and tags) the notable GitVersion tool, used to version artifacts, does not work.
If I explicitly add to the workflow

    - usesactions/checkout@v1
    - run: |
        git fetch --tags
        git branch --create-reflog master origin/master
then it works.
 
The expected behaviour would be setting an additional parameter at the checkout action, e.g.
    - usesactions/checkout@v1
      with:
        tags: true
and the master branch should always be available.

 
1 Reply
GitHub Staff
Message 2 of 2

Re: Checkout Action does not create local master and has no options for Tags breaking GitVersion

We are working on an update that will enable better scripting of git as part of your worklfows.  You can see the initail work in the 1.1 version https://github.com/actions/checkout/pull/56.  And there will be a 2.0 version coming that will make sure you are not in a detached head state.