Skip to content

Build script for containers using musl library#4

Open
kbaldyga wants to merge 1 commit intomasterfrom
build-musl
Open

Build script for containers using musl library#4
kbaldyga wants to merge 1 commit intomasterfrom
build-musl

Conversation

@kbaldyga
Copy link
Copy Markdown

Because there's no way for github actions to build golang binaries with musl library, we need to spin up a container, compile it there, and manually upload to Releases.

@kbaldyga kbaldyga requested a review from bermannoah August 14, 2020 15:04
Copy link
Copy Markdown
Contributor

@bermannoah bermannoah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is still public, I think it's worth automating the build process as much as we can. Not necessarily entirely in this PR, but if we can at least auto-increment the version number that's a good start. Would also help to document why we want to use musl.

Comment thread build/build.sh
# so we need to compile it inside a container
# and manually push the binary to github

VERSION=${VERSION:=0.18}
Copy link
Copy Markdown
Contributor

@bermannoah bermannoah Aug 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to automate this step and the upload phase. For now, can we pull and increment the version automatically, rather than hard-coding? Can use this to list recent versions: https://docs.github.com/en/rest/reference/repos#list-releases (We might also want to make musl releases distinct from the github actions generated releases, unless we remove that feature altogether).

Comment thread build/Dockerfile
@@ -0,0 +1,20 @@
FROM alpine:latest

RUN apk add --no-cache git make musl-dev go
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we document why we're building with musl? Either here or in the readme.

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

Successfully merging this pull request may close these issues.

2 participants