From 112590bcaef9dc2e7e992fd4fdf861815069d1d7 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sat, 29 Aug 2020 00:34:13 -0700 Subject: [PATCH] fix env. --- .github/workflows/build.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index db0cb36..8591c1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,6 +7,8 @@ jobs: name: Build runs-on: ubuntu-latest container: golang:1.13 + env: + PROJECT_PATH: /go/src/github.com/analogj/scrutiny steps: - name: Checkout uses: actions/checkout@v2 @@ -14,7 +16,6 @@ jobs: env: GOOS: linux GOARCH: amd64 - PROJECT_PATH: /go/src/github.com/analogj/scrutiny/ run: | mkdir -p $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-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 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 + ${{ env.PROJECT_PATH }}/scrutiny-web-linux-amd64 + ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-amd64 + +