pull/1/head
Jason Kulatunga 4 years ago
parent f59e6bd17e
commit 112590bcae

@ -7,6 +7,8 @@ jobs:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: golang:1.13 container: golang:1.13
env:
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -14,7 +16,6 @@ jobs:
env: env:
GOOS: linux GOOS: linux
GOARCH: amd64 GOARCH: amd64
PROJECT_PATH: /go/src/github.com/analogj/scrutiny/
run: | run: |
mkdir -p $PROJECT_PATH mkdir -p $PROJECT_PATH
cp -a $GITHUB_WORKSPACE/* $PROJECT_PATH/ cp -a $GITHUB_WORKSPACE/* $PROJECT_PATH/
@ -24,12 +25,15 @@ jobs:
go build -ldflags "-X main.goos=linux -X main.goarch=amd64" -o scrutiny-web-linux-amd64 -tags "static" webapp/backend/cmd/scrutiny/scrutiny.go go build -ldflags "-X main.goos=linux -X main.goarch=amd64" -o scrutiny-web-linux-amd64 -tags "static" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-X main.goos=linux -X main.goarch=amd64" -o scrutiny-collector-metrics-linux-amd64 -tags "static" collector/cmd/collector-metrics/collector-metrics.go go build -ldflags "-X main.goos=linux -X main.goarch=amd64" -o scrutiny-collector-metrics-linux-amd64 -tags "static" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-linux-amd64
chmod +x scrutiny-collector-metrics-linux-amd64
- name: Archive - name: Archive
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
env:
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
with: with:
name: binaries name: binaries
path: | path: |
$PROJECT_PATH/scrutiny-web-linux-amd64 ${{ env.PROJECT_PATH }}/scrutiny-web-linux-amd64
$PROJECT_PATH/scrutiny-collector-metrics-linux-amd64 ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-amd64

Loading…
Cancel
Save