You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scrutiny/.github/workflows/build.yaml

36 lines
1.1 KiB

name: CI
# This workflow is triggered on pushes to the repository.
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
container: golang:1.13
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
env:
GOOS: linux
GOARCH: amd64
PROJECT_PATH: /go/src/github.com/analogj/scrutiny/
run: |
mkdir -p $PROJECT_PATH
cp -a $GITHUB_WORKSPACE/* $PROJECT_PATH/
cd $PROJECT_PATH
go mod vendor
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
- name: Archive
uses: actions/upload-artifact@v2
env:
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
with:
name: binaries
path: |
$PROJECT_PATH/scrutiny-web-linux-amd64
$PROJECT_PATH/scrutiny-collector-metrics-linux-amd64