Skip to content

Commit 31e4e10

Browse files
Multiple workflow changes (#158)
* Add security workflows * Simplify CI * Add .DS_Store to .gitignore
1 parent f71d91f commit 31e4e10

File tree

4 files changed

+64
-20
lines changed

4 files changed

+64
-20
lines changed

.github/workflows/build-test.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,16 @@ on:
1111

1212
jobs:
1313
build:
14+
strategy:
15+
matrix:
16+
go-version: ["stable", "oldstable"]
1417
runs-on: ubuntu-latest
1518
steps:
1619
- uses: actions/checkout@v4
1720

1821
- uses: actions/setup-go@v5
1922
with:
20-
go-version: "stable"
21-
22-
- run: go version
23-
24-
- name: Build binary
25-
run: make
26-
27-
- name: Test
28-
run: make test
29-
30-
old-go-build:
31-
runs-on: ubuntu-latest
32-
steps:
33-
- uses: actions/checkout@v4
34-
35-
- uses: actions/setup-go@v5
36-
with:
37-
go-version: "oldstable"
38-
39-
- run: go version
23+
go-version: ${{ matrix.go-version }}
4024

4125
- name: Build binary
4226
run: make

.github/workflows/codeql.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '0 13 * * 5'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- language: go
23+
build-mode: autobuild
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v3
31+
with:
32+
languages: ${{ matrix.language }}
33+
build-mode: ${{ matrix.build-mode }}
34+
queries: security-and-quality
35+
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v3
38+
with:
39+
category: "/language:${{matrix.language}}"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Dependency review'
2+
on:
3+
pull_request:
4+
branches: [ "main" ]
5+
6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
10+
jobs:
11+
dependency-review:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: 'Checkout repository'
15+
uses: actions/checkout@v4
16+
- name: 'Dependency Review'
17+
uses: actions/dependency-review-action@v4
18+
with:
19+
comment-summary-in-pr: on-failure

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ dist
3030
out
3131

3232
dist/
33+
34+
.DS_Store

0 commit comments

Comments
 (0)