mirror of https://github.com/gwuhaolin/livego.git
45 changed files with 251 additions and 134 deletions
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
name: release |
||||
on: |
||||
release: |
||||
types: [published] |
||||
jobs: |
||||
goreleaser: |
||||
runs-on: ubuntu-latest |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
steps: |
||||
- name: Set up Go 1.13 |
||||
uses: actions/setup-go@v1 |
||||
with: |
||||
go-version: 1.13 |
||||
id: go |
||||
- name: Check out code into the Go module directory |
||||
uses: actions/checkout@v1 |
||||
- name: Get dependencies |
||||
run: go mod tidy |
||||
- name: Go release |
||||
uses: goreleaser/goreleaser-action@v1 |
||||
- name: Docker release |
||||
uses: elgohr/Publish-Docker-Github-Action@master |
||||
with: |
||||
name: gwuhaolin/livego |
||||
username: ${{ secrets.DOCKER_USERNAME }} |
||||
password: ${{ secrets.DOCKER_PASSWORD }} |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
name: Test |
||||
on: [push] |
||||
jobs: |
||||
test: |
||||
name: Build |
||||
runs-on: ${{ matrix.os }} |
||||
strategy: |
||||
matrix: |
||||
os: [ubuntu-latest, windows-latest, macOS-latest] |
||||
|
||||
steps: |
||||
- name: Set up Go 1.13 |
||||
uses: actions/setup-go@v1 |
||||
with: |
||||
go-version: 1.13 |
||||
id: go |
||||
- name: Check out code into the Go module directory |
||||
uses: actions/checkout@v1 |
||||
- name: Get dependencies |
||||
run: go mod tidy |
||||
- name: Test |
||||
run: go test ./... |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
before: |
||||
hooks: |
||||
- go mod tidy |
||||
builds: |
||||
- binary: livego |
||||
id: livego |
||||
main: ./main.go |
||||
goos: |
||||
- windows |
||||
- darwin |
||||
- linux |
||||
- freebsd |
||||
goarch: |
||||
- amd64 |
||||
- 386 |
||||
- arm |
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
{ |
||||
"server": [ |
||||
{ |
||||
"appname": "live", |
||||
"liveon": "on", |
||||
"hlson": "on" |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
FROM golang:latest as builder |
||||
WORKDIR /app |
||||
COPY go.mod go.sum ./ |
||||
RUN go mod download |
||||
COPY . . |
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o livego ./ |
||||
|
||||
FROM alpine:latest |
||||
LABEL maintainer="gwuhaolin <gwuhaolin@gmail.com>" |
||||
ENV RTMP_PORT 1935 |
||||
ENV HTTP_FLV_PORT 7001 |
||||
ENV HLS_PORT 7002 |
||||
ENV HTTP_OPERATION_PORT 8090 |
||||
COPY --from=builder /app/livego . |
||||
EXPOSE ${RTMP_PORT} |
||||
EXPOSE ${HTTP_FLV_PORT} |
||||
EXPOSE ${HLS_PORT} |
||||
EXPOSE ${HTTP_OPERATION_PORT} |
||||
CMD ./livego |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
module github.com/gwuhaolin/livego |
||||
|
||||
go 1.13 |
||||
|
||||
require ( |
||||
github.com/kr/pretty v0.1.0 // indirect |
||||
github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6 |
||||
github.com/satori/go.uuid v1.2.0 |
||||
github.com/stretchr/testify v1.4.0 |
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect |
||||
) |
@ -1,11 +0,0 @@
@@ -1,11 +0,0 @@
|
||||
build: |
||||
binary: livego |
||||
goos: |
||||
- windows |
||||
- darwin |
||||
- linux |
||||
- freebsd |
||||
goarch: |
||||
- amd64 |
||||
- 386 |
||||
- arm |
@ -1,10 +0,0 @@
@@ -1,10 +0,0 @@
|
||||
{ |
||||
"server": [ |
||||
{ |
||||
"appname":"live", |
||||
"liveon":"on", |
||||
"hlson":"on" |
||||
} |
||||
] |
||||
} |
||||
|
Loading…
Reference in new issue