Skip to content

Commit 34882b2

Browse files
authored
Merge pull request #1510 from elezar/run-golang-checks-on-prs
[no-relnote] Run golang checks on PRs
2 parents c7cfc08 + d541925 commit 34882b2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/golang.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ name: Golang
1616

1717
on:
1818
workflow_call: {}
19+
pull_request:
20+
types:
21+
- opened
22+
- synchronize
23+
branches:
24+
- main
25+
- release-*
1926

2027
jobs:
2128
check:
@@ -77,7 +84,7 @@ jobs:
7784

7885
build:
7986
name: Build
80-
runs-on: linux-amd64-cpu4
87+
runs-on: ${{ ( github.event_name == 'pull_request' ) && 'ubuntu-latest' || 'linux-amd64-cpu4' }}
8188
permissions:
8289
contents: read
8390
id-token: write
@@ -97,10 +104,11 @@ jobs:
97104
go-version: ${{ env.GOLANG_VERSION }}
98105

99106
- name: Setup Go Proxy
107+
if: ${{ !( github.event_name == 'pull_request' ) }}
100108
id: setup-go-proxy
101109
uses: nv-gha-runners/setup-artifactory-go-proxy@main
102110

103111
- env:
104-
GOPROXY: ${{ steps.setup-go-proxy.outputs.goproxy-url }}
112+
GOPROXY: ${{ ( github.event_name == 'pull_request' ) && '' || steps.setup-go-proxy.outputs.goproxy-url }}
105113
run: |
106114
make build

0 commit comments

Comments
 (0)