a03c04cac3
Former-commit-id: d0a6384501a241fd76ff19b7f7b6c233a961f6e5 Former-commit-id: 9bab88613c4fb22ffa0cafa4d6a554a687ad16bf [formerly 3d19563604d912979f5f290ab94c2ac67ce84f0f] [formerly 5b79fe87aeb64c82eaee145751003c19dab56042 [formerly 2066c6d870d8f3dd231fd420c2174cf24ae3f00f [formerly 89c445285de7730d30768a0c32d78b136e2b63c6] [formerly 89c445285de7730d30768a0c32d78b136e2b63c6 [formerly 89c445285de7730d30768a0c32d78b136e2b63c6 [formerly 83fdb8cd00f0590c5a40c75485fb0ff64c7c80e4]]]]] Former-commit-id: fb700b4ce9329a7a88d7946d06ea822d728d20e4 [formerly a5fe020451941e1096009173fd66a240c5690be3] Former-commit-id: eecd867a4327c5892ab7b9c2349be85b305157f3 Former-commit-id: 6d953911923e105f687ded8ce8ad1f3935f49157 Former-commit-id: ec4fec30e7780f5e9e14861d9efd851de6dd8035 Former-commit-id: 89b6706de4cbd2a204b874ff4eb8b34f2f6952b6 [formerly 48768f543cd0a1db4d9dcb917460b1451f5f9989] Former-commit-id: 55c12b01c3135f4529cd7121e14725ff58b89945
89 lines
2.3 KiB
YAML
89 lines
2.3 KiB
YAML
name: Build bot
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
- name: Login to DockerHub
|
|
if: github.repository == 'erebe/wstunnel'
|
|
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: ${{ github.repository == 'erebe/wstunnel' && github.ref == 'refs/heads/master' }}
|
|
tags: ghcr.io/erebe/wstunnel:latest
|
|
|
|
- name: extract Artifact
|
|
run: |
|
|
docker cp $(docker create ghcr.io/erebe/wstunnel:latest /bin/sh -c 'sleep 5000'):/wstunnel .
|
|
./wstunnel
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
with:
|
|
name: wstunnel-linux-x64
|
|
path: wstunnel
|
|
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
# - name: Install stack
|
|
# run: |
|
|
# curl -sSL https://get.haskellstack.org/ | sh
|
|
|
|
- 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
|
|
|
|
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
# - name: Install stack
|
|
# run: |
|
|
# curl -sSL https://get.haskellstack.org/ | sh
|
|
|
|
- name: Setup GHC
|
|
run: |
|
|
stack setup
|
|
|
|
- name: Build
|
|
run: |
|
|
stack install
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
with:
|
|
name: wstunnel-macos
|
|
path: /Users/runner/.local/bin/wstunnel
|