From 58858c99c23c8eda4eef804263f1ecb74cdca413 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 14 Jul 2020 15:43:48 -0700 Subject: [PATCH] Github action for building binary + docker image --- .github/workflows/buildmaster.yaml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/buildmaster.yaml diff --git a/.github/workflows/buildmaster.yaml b/.github/workflows/buildmaster.yaml new file mode 100644 index 000000000..1b86da941 --- /dev/null +++ b/.github/workflows/buildmaster.yaml @@ -0,0 +1,37 @@ +name: Build Owncast + +on: + push: + branches: + - github-actions + pull_request: + branches: master + +jobs: + build: + strategy: + matrix: + go-version: [1.13.x, 1.14.x] + platform: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.platform }} + + steps: + - name: Install go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - uses: actions/checkout@v2 + + - name: Build + run: go build -o owncast *.go + + docker-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build Docker image + run: docker build . --tag test-docker-image-build + + - name: Run Docker image + run: docker run -p 8080:8080 -p 1935:1935 test-docker-image-build \ No newline at end of file