This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0921e34
Showing
16 changed files
with
1,425 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM scratch | ||
COPY iptv-proxy / | ||
ENTRYPOINT ["/iptv-proxy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Unshallow | ||
run: git fetch --prune --unshallow | ||
- | ||
name: Github Docker login | ||
run: echo ${{ secrets.GHCR_PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist --skip-sign | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.29 | ||
|
||
vet: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
if: success() | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run vet | ||
run: go vet ./... | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
if: success() | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run tests | ||
run: go test -v -covermode=count ./... | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
if: success() | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Calc coverage | ||
run: | | ||
go test -v -covermode=count -coverprofile=coverage.out ./... | ||
- name: Convert coverage.out to coverage.lcov | ||
uses: jandelgado/gcov2lcov-action@v1.0.6 | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: coverage.lcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
/iptv-proxy | ||
*.m3u | ||
vendor | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
project_name: iptv-proxy | ||
|
||
builds: | ||
- id: iptv-proxy | ||
main: ./cmd/iptv-proxy/main.go | ||
binary: iptv-proxy | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
|
||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
|
||
release: | ||
github: | ||
owner: fugkco | ||
name: iptv-proxy | ||
draft: false | ||
|
||
dockers: | ||
- &docker_build | ||
goos: linux | ||
goarch: amd64 | ||
binaries: | ||
- iptv-proxy | ||
builds: | ||
- iptv-proxy | ||
image_templates: | ||
- "ghcr.io/fugkco/iptv-proxy:{{ .Tag }}-amd64" | ||
- "ghcr.io/fugkco/iptv-proxy:v{{ .Major }}-amd64" | ||
- "ghcr.io/fugkco/iptv-proxy:v{{ .Major }}.{{ .Minor }}-amd64" | ||
- "ghcr.io/fugkco/iptv-proxy:latest-amd64" | ||
|
||
skip_push: false | ||
|
||
build_flag_templates: | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
|
||
dockerfile: .Dockerfile.goreleaser | ||
- <<: *docker_build | ||
goarch: arm | ||
goarm: 6 | ||
image_templates: | ||
- "ghcr.io/fugkco/iptv-proxy:{{ .Tag }}-arm32v7" | ||
- "ghcr.io/fugkco/iptv-proxy:v{{ .Major }}-arm32v7" | ||
- "ghcr.io/fugkco/iptv-proxy:v{{ .Major }}.{{ .Minor }}-arm32v7" | ||
- "ghcr.io/fugkco/iptv-proxy:latest-arm32v7" | ||
|
||
- <<: *docker_build | ||
goarch: arm64 | ||
image_templates: | ||
- "ghcr.io/fugkco/iptv-proxy:{{ .Tag }}-arm64v8" | ||
- "ghcr.io/fugkco/iptv-proxy:v{{ .Major }}-arm64v8" | ||
- "ghcr.io/fugkco/iptv-proxy:v{{ .Major }}.{{ .Minor }}-arm64v8" | ||
- "ghcr.io/fugkco/iptv-proxy:latest-arm64v8" | ||
|
||
# .goreleaser.yml | ||
checksum: | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM golang:1.14.4-alpine | ||
|
||
WORKDIR /src | ||
COPY . . | ||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -o iptv-proxy ./cmd/iptv-proxy/main.go | ||
|
||
FROM scratch | ||
COPY --from=0 /src/iptv-proxy / | ||
ENTRYPOINT ["/iptv-proxy"] |
Oops, something went wrong.