Skip to content

Commit

Permalink
Merge pull request #471 from cbosdo/govulncheck
Browse files Browse the repository at this point in the history
Add govulncheck workflow
  • Loading branch information
cbosdo authored Nov 4, 2024
2 parents d651c13 + 13632c4 commit 939959e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-FileCopyrightText: 2023 SUSE LLC
#
# SPDX-License-Identifier: Apache-2.0

name: Vulnerability check

on:
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
govulncheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0

- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
shell: bash

- id: govulncheck
name: Run govulncheck
run: govulncheck -tags ptf ./...
shell: bash
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/uyuni-project/uyuni-tools

go 1.20
go 1.21

require (
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2
Expand Down
6 changes: 3 additions & 3 deletions uyuni-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ BuildRequires: fish
BuildRequires: zsh
# Get the proper Go version on different distros
%if 0%{?suse_version}
BuildRequires: golang(API) >= 1.20
BuildRequires: golang(API) >= 1.21
%endif
# 0%{?suse_version}

Expand All @@ -78,12 +78,12 @@ BuildRequires: golang-%{go_version}
# 0%{?ubuntu}

%if 0%{?debian}
BuildRequires: golang >= 1.20
BuildRequires: golang >= 1.21
%endif
# 0%{?debian}

%if 0%{?fedora} || 0%{?rhel}
BuildRequires: golang >= 1.19
BuildRequires: golang >= 1.21
%endif
# 0%{?fedora} || 0%{?rhel}

Expand Down

0 comments on commit 939959e

Please sign in to comment.