From 3bfb0632a9ee38b9ad93cd6a30ab335f0043de70 Mon Sep 17 00:00:00 2001 From: Samir Faci Date: Fri, 6 Oct 2023 16:14:35 -0400 Subject: [PATCH] Trying matrix --- .github/workflows/code_scanners.yml | 48 ++++++++++++++++++++--------- .github/workflows/go.yml | 4 +-- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.github/workflows/code_scanners.yml b/.github/workflows/code_scanners.yml index 957c9289..d76fc5c8 100644 --- a/.github/workflows/code_scanners.yml +++ b/.github/workflows/code_scanners.yml @@ -18,19 +18,11 @@ permissions: jobs: - govulncheck_job: - runs-on: ubuntu-latest - name: Run govulncheck - steps: - - id: govulncheck - uses: golang/govulncheck-action@v1 - with: - go-version-input: "1.21.2" - go-package: ./... - security_scan: - runs-on: ubuntu-latest - env: - GO111MODULE: on + code_scanning: + strategy: + matrix: + job_name: ['security', 'vuln_check'] + job_desc: ['Running Security Scan', 'Running Vulnerability Scan'] steps: - name: Checkout Source uses: actions/checkout@v3 @@ -42,8 +34,34 @@ jobs: run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d - name: Installing Go Tools run: ./bin/task install_tools - - name: Running security scanning - run: ./bin/task security + - name: ${{ matrix.job_desc }} + run: ./bin/task ${{ matrix.job_name }} + govulncheck_job: + runs-on: ubuntu-latest + name: Run govulncheck + steps: + - id: govulncheck + uses: golang/govulncheck-action@v1 + with: + go-version-input: "1.21.2" + go-package: ./... +# security_scan: +# runs-on: ubuntu-latest +# env: +# GO111MODULE: on +# steps: +# - name: Checkout Source +# uses: actions/checkout@v3 +# - uses: actions/setup-go@v4 +# with: +# go-version: "1.21.2" +# cache: false +# - name: Install Task +# run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d +# - name: Installing Go Tools +# run: ./bin/task install_tools +# - name: Running security scanning +# run: ./bin/task security golangci: name: lint runs-on: ubuntu-latest diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dcba8a1d..6dd57fa0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,14 +6,12 @@ on: - master pull_request: -env: - GO_VERSION: 1.21.0 jobs: test: strategy: matrix: - go: [ $GO_VERSION ] + go: [ 1.21.0 ] grafana: [ 8.5.22, 9.4.3, 10.1.4 ] env: