Skip to content

Commit b0752c0

Browse files
authored
Merge pull request #42 from btnguyen2k/dev
Prepare to release next version
2 parents 4a2d193 + 49ecd25 commit b0752c0

File tree

5 files changed

+56
-7
lines changed

5 files changed

+56
-7
lines changed

.github/codeql/codeql-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: "CodeQL config"
2+
3+
paths-ignore:
4+
- module_test
5+
6+
queries:
7+
- uses: security-and-quality

.github/workflows/ci.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
name: Check format with go fmt
1515
steps:
16-
- name: Check out code
16+
- name: Checkout code
1717
uses: actions/checkout@v4
1818
- name: Set up Go env
19-
uses: actions/setup-go@v4
19+
uses: actions/setup-go@v5
2020
with:
2121
# pick one Go version to check format
2222
go-version: '1.18'
@@ -29,10 +29,10 @@ jobs:
2929
name: GoLint
3030
runs-on: ubuntu-latest
3131
steps:
32-
- name: Check out code
32+
- name: Checkout code
3333
uses: actions/checkout@v4
3434
- name: Set up Go env
35-
uses: actions/setup-go@v4
35+
uses: actions/setup-go@v5
3636
with:
3737
# pick one Go version for linting
3838
go-version: '1.18'
@@ -49,10 +49,10 @@ jobs:
4949
go: [ '1.18', 'oldstable', 'stable' ]
5050
name: Run tests with Go ${{ matrix.go }}
5151
steps:
52-
- name: Check out code
52+
- name: Checkout code
5353
uses: actions/checkout@v4
5454
- name: Set up Go env
55-
uses: actions/setup-go@v4
55+
uses: actions/setup-go@v5
5656
with:
5757
go-version: ${{ matrix.go }}
5858
- name: Run tests

.github/workflows/codeql.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
schedule:
9+
# run every Saturday at 00:00 UTC
10+
- cron: '0 0 * * 6'
11+
12+
jobs:
13+
Analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
24+
language: [ 'go' ]
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v3
30+
with:
31+
languages: ${{ matrix.language }}
32+
config-file: ./.github/codeql/codeql-config.yaml
33+
# Autobuild attempts to build any compiled languages (C/C++, C#, Java, etc).
34+
# If this step fails, then you should remove it and run the build manually (see below)
35+
# ℹ️ Command-line programs to run using the OS shell.
36+
# 📚 https://git.io/JvXDl
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v3
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
VERSION: ${{ steps.release_dry_run.outputs.releaseVersion }}
2727
RELEASE_NOTES: ${{ steps.release_dry_run.outputs.releaseNotes }}
2828
steps:
29-
- name: Check out code
29+
- name: Checkout code
3030
uses: actions/checkout@v4
3131
- name: Install Node
3232
uses: actions/setup-node@v4

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Template to quickly spin up a Go module project.
1414
- `dependabot.yaml`, `automerge-dependabot.yaml`: automatically update dependencies and merge PRs from dependabot.
1515
- `ci.yaml`: automatically run tests and generate code coverage report.
1616
- `release.yaml`: automatically create a new release.
17+
- `codeql.yaml`: automatically run CodeQL analysis.
1718

1819
## Usage
1920

@@ -32,6 +33,7 @@ Template to quickly spin up a Go module project.
3233
Workflows implemented by this template are as the following:
3334

3435
- `dependabot.yaml` configures dependencies are checked and updated weekly. `dependabot` will create a PR for each dependency update. `automerge-dependabot.yaml` is triggered to automatically merged PRs to `main` branch.
36+
- `codeql.yaml` is triggered on every push, pr and periodically to run CodeQL analysis.
3537
- `ci.yaml` is triggered on every push to any branch to run tests and generate code coverage report.
3638
- Once PR is approved and merged to `release` branch, `release.yaml` is triggered to create a new release. Then a new PR is created to merge `release` branch to `main` branch.
3739

0 commit comments

Comments
 (0)