generated from unoplat/base-project-structure
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 897 Bytes
/
main-pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Go CI
on:
pull_request:
branches:
- main
paths:
- 'image-action-gh/base-project/image-scan/**'
jobs:
test-build-publish:
name: Test, Build, and Publish
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetches all history for all branches and tags
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '>1.21' # Set this to the Go version you want to use
- name: Install dependencies
working-directory: image-action-gh/base-project/image-scan
run: go mod tidy
- name: Test
working-directory: image-action-gh/base-project/image-scan
run: go test ./...
- name: Build
working-directory: image-action-gh/base-project/image-scan
run: go build -o image-scan