Skip to content

Commit db1e78d

Browse files
committed
ci: optimize checkout
1 parent 3be11e6 commit db1e78d

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.github/workflows/go.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,43 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
1618
- uses: actions/setup-go@v5
1719
with:
18-
go-version: '1.24.2'
20+
go-version: "1.24.2"
1921
- run: go mod tidy
2022
- name: golangci-lint
2123
uses: golangci/golangci-lint-action@v7
2224
with:
2325
version: v2.0
2426
continue-on-error: true
2527

26-
2728
gosec:
2829
runs-on: ubuntu-latest
2930
env:
3031
GO111MODULE: on
3132
steps:
3233
- uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
3336
- uses: actions/setup-go@v5
3437
with:
35-
go-version: '1.24.2'
38+
go-version: "1.24.2"
3639
- run: go mod tidy
3740
- name: Run Gosec Security Scanner
3841
uses: securego/gosec@master
3942
with:
4043
args: ./...
4144
continue-on-error: true
4245

43-
4446
gotestsum:
4547
runs-on: ubuntu-latest
4648
steps:
4749
- uses: actions/checkout@v4
4850
- uses: actions/setup-go@v5
4951
with:
50-
go-version: '1.24.2'
52+
go-version: "1.24.2"
5153
- run: go mod tidy
5254
- name: go-test
5355
run: |

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ name: release
33
on:
44
push:
55
tags:
6-
- '[0-9]+.[0-9]+.[0-9]+'
6+
- "[0-9]+.[0-9]+.[0-9]+"
77

88
jobs:
99
build-and-push:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code
1313
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
1416

1517
- name: Set up version variables
1618
id: vars
@@ -54,4 +56,4 @@ jobs:
5456
- name: Release Changelog Builder
5557
uses: mikepenz/release-changelog-builder-action@v5
5658
with:
57-
token : ${{ secrets.GITHUB_TOKEN }}
59+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)