Skip to content

Commit 9ebca58

Browse files
committed
chore: disable push and add PR workflow
1 parent 43cb4f3 commit 9ebca58

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

.github/workflows/pull-request.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
merge_group:
6+
7+
jobs:
8+
dump_contexts_to_log:
9+
runs-on: ${{ matrix.os }}
10+
env:
11+
CGO_ENABLED: 0
12+
13+
strategy:
14+
matrix:
15+
go-version: [ stable ]
16+
os: [ubuntu-latest] # [ubuntu-latest, macos-latest, windows-latest]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
- name: Set up Go ${{ matrix.go-version }}
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: ${{ matrix.go-version }}
27+
28+
- name: Build
29+
run: make
30+
31+
- name: Dump GitHub context
32+
env:
33+
GITHUB_CONTEXT: ${{ toJson(github) }}
34+
run: echo "$GITHUB_CONTEXT"
35+
36+
- name: git log
37+
run: git log --graph --pretty=tformat:'%Cred%h%Creset %Cblue%G?%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset' --branches --remotes
38+
39+
- name: golangci-lint
40+
uses: golangci/golangci-lint-action@3ab19875d7f33278aa6f7cdbdd1f37ed29bbace2
41+
with:
42+
version: v1.57
43+
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
44+
# install-mode: "goinstall"
45+
only-new-issues: true

.github/workflows/push.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Push
22

33
on:
44
push:
5+
branches:
6+
- temp
57

68
jobs:
79
dump_contexts_to_log:
@@ -17,9 +19,6 @@ jobs:
1719
steps:
1820
- name: Checkout code
1921
uses: actions/checkout@v4
20-
with:
21-
fetch-depth: 0
22-
2322
- name: Set up Go ${{ matrix.go-version }}
2423
uses: actions/setup-go@v5
2524
with:

0 commit comments

Comments
 (0)