Skip to content

Commit b9fa952

Browse files
committed
chore(i): workflows: update to shared workflows
1 parent 3cb8fb4 commit b9fa952

File tree

3 files changed

+61
-72
lines changed

3 files changed

+61
-72
lines changed

.github/workflows/go-ci.yaml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
name: CI
1+
name: Go CI
2+
permissions:
3+
contents: read
24
on:
35
push:
46
branches:
57
- main
8+
paths:
9+
- '**.go'
10+
- 'go.mod'
11+
- 'go.sum'
12+
- '.github/workflows/go-ci.yaml'
613
pull_request:
714
branches:
815
- main
16+
paths:
17+
- '**.go'
18+
- 'go.mod'
19+
- 'go.sum'
20+
- '.github/workflows/go-ci.yaml'
921
workflow_dispatch:
22+
1023
jobs:
11-
test:
12-
strategy:
13-
matrix:
14-
go-version: [1.26.x, 1.24.x]
15-
platform: [ubuntu-latest, macos-latest, windows-latest]
16-
runs-on: ${{ matrix.platform }}
17-
steps:
18-
- name: Install Go
19-
if: success()
20-
uses: actions/setup-go@v6
21-
with:
22-
go-version: ${{ matrix.go-version }}
23-
- name: Checkout code
24-
uses: actions/checkout@v6
25-
- name: Run tests
26-
run: go test -v -covermode=count ./...
24+
ci:
25+
uses: plexusone/.github/.github/workflows/go-ci.yaml@main

.github/workflows/go-lint.yaml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
name: lint
2-
on: [push, pull_request]
1+
name: Go Lint
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '**.go'
10+
- 'go.mod'
11+
- 'go.sum'
12+
- '.golangci.yml'
13+
- '.github/workflows/go-lint.yaml'
14+
pull_request:
15+
branches:
16+
- main
17+
paths:
18+
- '**.go'
19+
- 'go.mod'
20+
- 'go.sum'
21+
- '.golangci.yml'
22+
- '.github/workflows/go-lint.yaml'
23+
workflow_dispatch:
24+
325
jobs:
426
lint:
5-
strategy:
6-
matrix:
7-
go-version: [1.x]
8-
platform: [ubuntu-latest]
9-
runs-on: ${{ matrix.platform }}
10-
steps:
11-
- uses: actions/checkout@v6
12-
- name: golangci-lint
13-
uses: golangci/golangci-lint-action@v9
14-
with:
15-
version: latest
16-
args: --timeout 3m --max-same-issues 0 --max-issues-per-linter 0 --verbose
27+
uses: plexusone/.github/.github/workflows/go-lint.yaml@main
Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,29 @@
1-
name: "CodeQL SAST Analysis"
2-
1+
name: Go SAST (CodeQL)
2+
permissions:
3+
actions: read
4+
contents: read
5+
security-events: write
36
on:
47
push:
58
branches:
6-
- master
9+
- main
10+
paths:
11+
- '**.go'
12+
- 'go.mod'
13+
- 'go.sum'
14+
- '.github/workflows/go-sast-codeql.yaml'
715
pull_request:
816
branches:
9-
- master
17+
- main
18+
paths:
19+
- '**.go'
20+
- 'go.mod'
21+
- 'go.sum'
22+
- '.github/workflows/go-sast-codeql.yaml'
1023
schedule:
11-
- cron: '30 1 * * 0'
24+
- cron: '0 6 * * 1'
1225
workflow_dispatch:
1326

1427
jobs:
15-
analyze:
16-
name: Analyze
17-
runs-on: ubuntu-latest
18-
timeout-minutes: 360
19-
permissions:
20-
actions: read
21-
contents: read
22-
security-events: write
23-
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
language: ['go']
28-
29-
steps:
30-
- name: Checkout repository
31-
uses: actions/checkout@v6
32-
33-
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v4
35-
with:
36-
languages: ${{ matrix.language }}
37-
queries: security-extended,security-and-quality
38-
39-
- name: Set up Go
40-
uses: actions/setup-go@v6
41-
with:
42-
go-version: '1.24.x'
43-
44-
- name: Autobuild
45-
uses: github/codeql-action/autobuild@v4
46-
47-
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@v4
49-
with:
50-
category: "/language:${{matrix.language}}"
28+
sast:
29+
uses: plexusone/.github/.github/workflows/go-sast-codeql.yaml@main

0 commit comments

Comments
 (0)