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

Action failing: Command failed: git describe --tags --abbrev=0 #97

Closed
eberkund opened this issue Feb 14, 2020 · 4 comments · Fixed by #98
Closed

Action failing: Command failed: git describe --tags --abbrev=0 #97

eberkund opened this issue Feb 14, 2020 · 4 comments · Fixed by #98
Labels
bug Something isn't working

Comments

@eberkund
Copy link

The same commits in my repo which were previously passing are now failing

Run goreleaser/goreleaser-action@v1
✅ GoReleaser version found: v0.126.0
⬇️ Downloading https://github.com/goreleaser/goreleaser/releases/download/v0.126.0/goreleaser_Linux_x86_64.tar.gz...
📦 Extracting GoReleaser...
/bin/tar --version
tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/04821171-ce64-41cd-84e3-68cb9f85226e -f /tmp/goreleaser-vE1CQY/goreleaser_Linux_x86_64.tar.gz
fatal: No names found, cannot describe anything.
##[error]Command failed: git describe --tags --abbrev=0
fatal: No names found, cannot describe anything.

##[error]Node run failed with exit code 1
@crazy-max
Copy link
Member

crazy-max commented Feb 14, 2020

@eberkund Can you give a link to your repo please?
And also try with the following branch: uses: goreleaser/goreleaser-action@fix-gettag

@eberkund
Copy link
Author

It is a private repo so I cannot share it unfortunately. This is the contents of my goreleaser.yml file though.

env:
  - GOPROXY=https://proxy.golang.org
  - CGO_ENABLED=0
  - GO111MODULE=on

before:
  hooks:
    - go mod download

builds:
  - binary: simulator
    ldflags: -s -w -X simulator/cmd.commit={{.ShortCommit}} -X simulator/cmd.version={{.Version}}
    goos:
      - windows
      - linux
      - darwin
    goarch:
      - amd64

archives:
  - format: zip
    files:
      - README.md
      - screenshot.png

nfpms:
  - maintainer: xxx
    homepage: xxx
    description: Blah blah blah
    formats:
      - deb
    files:
      "etc/simulator.service": "/lib/systemd/system/simulator.service"
      "etc/default.yml": "/etc/mero/simulator.yml"

checksum:
  name_template: "checksums.txt"

snapshot:
  name_template: "{{ .Tag }}-next"

changelog:
  sort: asc
  filters:
    exclude:
      - "^docs:"
      - "^test:"

In my GitHub workflow I added if: startsWith(github.ref, 'refs/tags/') based on the updated README as a workaround for now (which just skips the action). Previously I was using the action without a condition and things were working as expected. Is this the intended behaviour?

I have only tried non-tagged commits because I didn't want to make a release when the build was failing.

     - name: Run goreleaser
        uses: goreleaser/goreleaser-action@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          version: latest
          args: release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

@eberkund
Copy link
Author

Hi @crazy-max I tried goreleaser/goreleaser-action@fix-gettag and it works again (without the if condition) thanks! Will that branch me merged to master soon?

@crazy-max crazy-max added the bug Something isn't working label Feb 14, 2020
@crazy-max
Copy link
Member

@eberkund Should be ok now ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants