forked from hajimehoshi/ebiten
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.82 KB
/
vuln.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Vulnerability Check
on: [push, pull_request]
jobs:
go-versions:
name: Get stable Go versions
runs-on: ubuntu-latest
outputs:
version-list: ${{ steps.go-dev-stable-versions.outputs.version-list }}
steps:
- name: List the latest stable versions of Go
id: go-dev-stable-versions
run: |
versions_json=$(curl -s https://go.dev/dl/?mode=json | jq '.[].version' | sed -e 's/^"go/"/' | jq -s -c '.')
echo "version-list=$versions_json" >> $GITHUB_OUTPUT
- name: Notify on go-dev-stable-versions
run: echo "::notice::version-list is ${{ steps.go-dev-stable-versions.outputs.version-list }}"
test:
needs: [go-versions]
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ${{ fromJson(needs.go-versions.outputs.version-list) }}
name: Vulnerability Check with Go ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
DISPLAY: ':99.0'
defaults:
run:
shell: bash
steps:
- name: Git
run: |
# See actions/checkout#135
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Install dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libasound2-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
- name: govulncheck
run: |
govulncheck ./...
env GOOS=js GOARCH=wasm govulncheck ./...