diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a0b3d9ed1..02961e980 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,9 +15,6 @@ on: - "README.md" - "docs/**" -env: - GO_VERSION: '~1.21' - jobs: lint: runs-on: ubuntu-latest @@ -30,7 +27,7 @@ jobs: - name: Setup go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'flagd/go.mod' - run: make workspace-init - run: make lint @@ -42,7 +39,7 @@ jobs: - name: Setup go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'flagd/go.mod' - run: make workspace-init - run: make generate-docs - name: Check no diff @@ -60,7 +57,7 @@ jobs: - name: Setup go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'flagd/go.mod' - run: make workspace-init - run: make test - name: Upload coverage to Codecov @@ -78,7 +75,7 @@ jobs: - name: Setup go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'flagd/go.mod' - name: Set up QEMU uses: docker/setup-qemu-action@master @@ -100,9 +97,8 @@ jobs: - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - input: /github/workspace/flagd-local.tar - format: "template" - template: "@/contrib/sarif.tpl" + input: ${{ github.workspace }}/flagd-local.tar + format: "sarif" output: "trivy-results.sarif" severity: "CRITICAL,HIGH" @@ -123,7 +119,7 @@ jobs: - name: Setup go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: 'flagd/go.mod' - name: Workspace init run: make workspace-init