mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-25 03:40:19 +01:00
forgot dockerfile
This commit is contained in:
parent
a7a3e685fe
commit
ca17555c22
3 changed files with 4 additions and 5 deletions
|
@ -6,7 +6,6 @@ bin
|
|||
*.pyc
|
||||
*.egg-info
|
||||
.vagrant
|
||||
.git
|
||||
.tmp
|
||||
bower_components
|
||||
node_modules
|
||||
|
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
|||
CGO_ENABLED: 0
|
||||
run: |
|
||||
go version
|
||||
go build -tags netgo -ldflags '-X github.com/dutchcoders/transfer.sh/cmd.Version=${GITHUB_REF##*/} -a -s -w -extldflags "-static"' -o ./artifacts/transfersh-${GITHUB_REF##*/}-${{ matrix.suffix }}
|
||||
go build -tags netgo -ldflags "-X github.com/dutchcoders/transfer.sh/cmd.Version=${GITHUB_REF##*/} -a -s -w -extldflags '-static'" -o ./artifacts/transfersh-${GITHUB_REF##*/}-${{ matrix.suffix }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
name: Upload artifacts
|
||||
with:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Default to Go 1.15
|
||||
ARG GO_VERSION=1.15
|
||||
# Default to Go 1.16
|
||||
ARG GO_VERSION=1.16
|
||||
FROM golang:${GO_VERSION}-alpine as build
|
||||
|
||||
# Necessary to run 'go get' and to compile the linked binary
|
||||
|
@ -12,7 +12,7 @@ WORKDIR /go/src/github.com/dutchcoders/transfer.sh
|
|||
ENV GO111MODULE=on
|
||||
|
||||
# build & install server
|
||||
RUN go get -u ./... && CGO_ENABLED=0 go build -tags netgo -ldflags '-a -s -w -extldflags "-static"' -o /go/bin/transfersh github.com/dutchcoders/transfer.sh
|
||||
RUN CGO_ENABLED=0 go build -tags netgo -ldflags "-X github.com/dutchcoders/transfer.sh/cmd.Version=$(git describe --tags) -a -s -w -extldflags '-static'" -o /go/bin/transfersh
|
||||
|
||||
FROM scratch AS final
|
||||
LABEL maintainer="Andrea Spacca <andrea.spacca@gmail.com>"
|
||||
|
|
Loading…
Reference in a new issue