github-release-resource icon indicating copy to clipboard operation
github-release-resource copied to clipboard

globs - 502 Error Creating Policy

Open Jarlotee opened this issue 7 years ago • 2 comments

When trying to upload a .tar.gz file no mime type is being sent to github and it returns a 502

Example

 - put: github-pre-release
    params:
      name: version/name
      tag: version/number
      body: version/body
      commitish: source-code/.git/ref
      globs:
        - artifacts/*.tar.gz

It appears that the container is missing required system files to determine mime type:

go-github source code https://github.com/google/go-github/blob/master/github/repos_releases.go#L358

go example https://play.golang.org/p/3-HK1GnnMDl

mime source https://golang.org/pkg/mime/#TypeByExtension

Jarlotee avatar Jan 09 '19 17:01 Jarlotee

It looks like alpine does not have the mime.types file, but you get them by adding mailcap to the docker file https://pkgs.alpinelinux.org/contents?file=mime.types&path=%2Fetc&name=*&branch=edge&repo=main&arch=armhf

Jarlotee avatar Jan 09 '19 17:01 Jarlotee

While we wait for merge if anyone needs a drop-in replacement https://cloud.docker.com/repository/docker/treas/github-release-resource

Jarlotee avatar Jan 14 '19 18:01 Jarlotee