Skip to content

Commit 148b5a3

Browse files
Add govulncheck job to lint workflow and fix matrix job result syntax
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
1 parent 1f11737 commit 148b5a3

File tree

2 files changed

+66
-5
lines changed

2 files changed

+66
-5
lines changed

.github/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,39 @@ updates:
4545
directory: "/pkg/app/pipedv1/plugin/cloudrun"
4646
schedule:
4747
interval: "weekly"
48+
49+
- package-ecosystem: "gomod"
50+
directory: "/pkg/app/pipedv1/plugin/scriptrun"
51+
schedule:
52+
interval: "weekly"
53+
54+
- package-ecosystem: "gomod"
55+
directory: "/pkg/app/pipedv1/plugin/analysis"
56+
schedule:
57+
interval: "weekly"
58+
59+
- package-ecosystem: "gomod"
60+
directory: "/pkg/app/pipedv1/plugin/wait"
61+
schedule:
62+
interval: "weekly"
63+
64+
- package-ecosystem: "gomod"
65+
directory: "/pkg/app/pipedv1/plugin/waitapproval"
66+
schedule:
67+
interval: "weekly"
68+
69+
- package-ecosystem: "npm"
70+
directory: "/web"
71+
schedule:
72+
interval: "weekly"
73+
open-pull-requests-limit: 5
74+
75+
- package-ecosystem: "npm"
76+
directory: "/docs"
77+
schedule:
78+
interval: "monthly"
79+
80+
- package-ecosystem: "github-actions"
81+
directory: "/"
82+
schedule:
83+
interval: "weekly"

.github/workflows/lint.yaml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ jobs:
6060
# if jobs in the 'go' job matrix failed or were cancelled, this job will fail
6161
# otherwise this job is marked as successful because all steps are skipped
6262
run: exit 1
63-
if: >-
64-
${{
65-
contains(needs.*.result, 'failure')
66-
|| contains(needs.*.result, 'cancelled')
67-
}}
63+
if: needs.go.result != 'success'
6864

6965
web:
7066
runs-on: ubuntu-24.04
@@ -100,3 +96,32 @@ jobs:
10096

10197
- name: Lint all Helm charts
10298
run: make lint/helm
99+
100+
govulncheck:
101+
runs-on: ubuntu-24.04
102+
needs: list-go-modules
103+
strategy:
104+
fail-fast: false
105+
matrix:
106+
module: ${{ fromJSON(needs.list-go-modules.outputs.modules) }}
107+
steps:
108+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
109+
- uses: actions/setup-go@v5
110+
with:
111+
go-version: ${{ env.GO_VERSION }}
112+
- name: Install govulncheck
113+
run: go install golang.org/x/vuln/cmd/govulncheck@latest
114+
- name: Run govulncheck
115+
working-directory: ${{ matrix.module }}
116+
run: govulncheck ./...
117+
118+
govulncheck-completed:
119+
runs-on: ubuntu-24.04
120+
if: always()
121+
needs: govulncheck
122+
steps:
123+
- name: Check if all govulncheck jobs succeeded
124+
# if jobs in the 'govulncheck' job matrix failed or were cancelled, this job will fail
125+
# otherwise this job is marked as successful because all steps are skipped
126+
run: exit 1
127+
if: needs.govulncheck.result != 'success'

0 commit comments

Comments
 (0)