2020-01-06 14:54:29 +00:00
|
|
|
name: Build bot
|
2020-01-04 22:27:04 +00:00
|
|
|
|
2020-01-04 22:33:49 +00:00
|
|
|
on: [push, pull_request]
|
2020-01-04 22:27:04 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-01-06 14:54:29 +00:00
|
|
|
build-linux:
|
2020-01-04 22:27:04 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-08 11:24:57 +00:00
|
|
|
- name: Check out the repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.CR_PAT }}
|
|
|
|
|
|
|
|
- name: wstunnel-builder-cache
|
|
|
|
id: docker_build_wstunnel-cache
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: ghcr.io/erebe/wstunnel:builder-cache
|
|
|
|
target: builder-cache
|
|
|
|
|
|
|
|
- name: wstunnel
|
|
|
|
id: docker_build_wstunnel
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: ghcr.io/erebe/wstunnel:latest
|
2020-01-04 22:33:49 +00:00
|
|
|
|
2020-01-04 22:27:04 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2020-11-08 11:24:57 +00:00
|
|
|
docker run --rm -v $(pwd):/data ghcr.io/erebe/wstunnel:latest /bin/cp /wstunnel /data/
|
2020-01-04 22:58:44 +00:00
|
|
|
./wstunnel
|
2020-01-04 23:04:11 +00:00
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
2020-01-06 14:54:29 +00:00
|
|
|
name: wstunnel-linux-x64
|
2020-01-04 23:04:11 +00:00
|
|
|
path: wstunnel
|
2020-01-06 14:54:29 +00:00
|
|
|
|
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2020-11-08 11:28:48 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-01-06 14:54:29 +00:00
|
|
|
|
2020-07-12 10:42:20 +00:00
|
|
|
# - name: Install stack
|
|
|
|
# run: |
|
|
|
|
# curl -sSL https://get.haskellstack.org/ | sh
|
2020-01-06 14:54:29 +00:00
|
|
|
|
|
|
|
- name: Setup GHC
|
|
|
|
run: |
|
|
|
|
stack setup
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
stack install
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: wstunnel-windows-x64.exe
|
|
|
|
path: C:\Users\runneradmin\AppData\Roaming\local\bin\wstunnel.exe
|
2020-01-07 17:31:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2020-11-08 11:28:48 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-01-07 17:31:42 +00:00
|
|
|
|
2020-07-12 10:42:20 +00:00
|
|
|
# - name: Install stack
|
|
|
|
# run: |
|
|
|
|
# curl -sSL https://get.haskellstack.org/ | sh
|
2020-01-07 17:31:42 +00:00
|
|
|
|
|
|
|
- name: Setup GHC
|
|
|
|
run: |
|
|
|
|
stack setup
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
stack install
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: wstunnel-macos
|
2020-01-07 18:28:20 +00:00
|
|
|
path: /Users/runner/.local/bin/wstunnel
|