-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
8 changed files
with
110 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,79 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: master | ||
tags: | ||
- v*.* | ||
pull_request: | ||
jobs: | ||
docker: | ||
if: github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
- run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" | ||
id: branch | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: build server docker | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: server/Dockerfile | ||
tags: segator/transcoderd:${{ steps.branch.outputs.branch }} | ||
push: true | ||
- run: | | ||
sudo swapoff -a | ||
sudo rm -f /swapfile | ||
sudo apt clean | ||
docker system prune --volumes -f | ||
- name: build worker docker | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: worker/Dockerfile.encode | ||
tags: segator/encoder-agent:${{ steps.branch.outputs.branch }} | ||
push: true | ||
- name: build worker docker PGS | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: worker/Dockerfile.pgs | ||
tags: segator/pgs-agent:${{ steps.branch.outputs.branch }} | ||
push: true | ||
binary: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu", "windows", "macos"] | ||
runs-on: ${{ matrix.os}}-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
- run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" | ||
shell: bash | ||
id: branch | ||
- name: Build Server | ||
run: | | ||
go run build.go build server -p ${{matrix.os}}-amd64 | ||
- name: Build Workers | ||
run: | | ||
go run build.go build worker -p ${{matrix.os}}-amd64 -m console | ||
- name: Upload Release Asset | ||
if: github.event_name == 'push' | ||
id: upload-release-asset | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: wip-${{ steps.branch.outputs.branch }} | ||
file: dist/* | ||
overwrite: true | ||
file_glob: true |
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
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
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
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
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
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