github action building

pull/576/head
hunterlong 2020-05-05 19:21:30 -07:00
parent 8cf0075b46
commit 8f05bb5acd
1 changed files with 14 additions and 4 deletions

View File

@ -86,6 +86,7 @@ jobs:
- name: Setting ENV's - name: Setting ENV's
run: | run: |
echo "::set-env name=GOPATH::${{ github.workspace }}/go"
echo "::add-path::$(go env GOPATH)/bin" echo "::add-path::$(go env GOPATH)/bin"
echo "::add-path::/opt/hostedtoolcache/node/10.20.1/x64/bin" echo "::add-path::/opt/hostedtoolcache/node/10.20.1/x64/bin"
echo ::set-env name=VERSION::$(cat version.txt) echo ::set-env name=VERSION::$(cat version.txt)
@ -95,12 +96,13 @@ jobs:
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: static-rice-box name: static-rice-box
path: ./source path: ./go/src/github.com/${{ github.repository }}/source
- name: Install Statping - name: Install Statping
env: env:
VERSION: ${{ env.VERSION }} VERSION: ${{ env.VERSION }}
run: | run: |
cd ./go/src/github.com/${{ github.repository }}
make build make build
chmod +x statping chmod +x statping
mv statping $(go env GOPATH)/bin/ mv statping $(go env GOPATH)/bin/
@ -148,12 +150,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 1
path: ./go/src/github.com/${{ github.repository }}
- uses: actions/setup-go@v2 - uses: actions/setup-go@v2
with: with:
go-version: '1.14.2' go-version: '1.14.2'
- name: Setting ENV's - name: Setting ENV's
run: | run: |
echo "::set-env name=GOPATH::${{ github.workspace }}/go"
echo "::add-path::$(go env GOPATH)/bin" echo "::add-path::$(go env GOPATH)/bin"
echo "::add-path::/opt/hostedtoolcache/node/10.20.1/x64/bin" echo "::add-path::/opt/hostedtoolcache/node/10.20.1/x64/bin"
echo ::set-env name=VERSION::$(cat version.txt) echo ::set-env name=VERSION::$(cat version.txt)
@ -163,12 +170,13 @@ jobs:
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: static-rice-box name: static-rice-box
path: ./source path: ./go/src/github.com/${{ github.repository }}/source
- name: Install Statping - name: Install Statping
env: env:
VERSION: ${{ env.VERSION }} VERSION: ${{ env.VERSION }}
run: | run: |
cd ./go/src/github.com/${{ github.repository }}
make build make build
chmod +x statping chmod +x statping
mv statping $(go env GOPATH)/bin/ mv statping $(go env GOPATH)/bin/
@ -197,7 +205,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
fetch-depth: 1 fetch-depth: 1
path: go/src/github.com/${{ github.repository }} path: ./go/src/github.com/${{ github.repository }}
- name: Setting ENV's - name: Setting ENV's
run: | run: |
@ -208,7 +216,9 @@ jobs:
shell: bash shell: bash
- name: Download Go mods - name: Download Go mods
run: make test-deps run: |
cd ./go/src/github.com/${{ github.repository }}
make test-deps
- name: Download Compiled Frontend (rice-box.go) - name: Download Compiled Frontend (rice-box.go)
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1