generated from ZEISS/template-action
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (65 loc) · 1.77 KB
/
build.yml
File metadata and controls
71 lines (65 loc) · 1.77 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# .github/workflows/main.yml
name: Build & Test
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: ./tools/go.mod
cache-dependency-path: |
tools/go.sum
go.sum
- run: make test
- uses: dorny/test-reporter@v3
if: success() || failure()
with:
name: Go Test Results
path: .test/reports/**-test.xml
reporter: java-junit
fail-on-error: "true"
- uses: actions/upload-artifact@v7
if: success() || failure()
with:
name: Test Reports
path: .test/reports/**
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: ./tools/go.mod
check-latest: true
- run: make lint
build:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: ./tools/go.mod
check-latest: true
- run: make build
- uses: peter-evans/create-pull-request@v7
id: cpr
with:
token: ${{ secrets.GH_PAT }}
commit-message: "Build artifacts"
title: "Build artifacts"
branch: "build-artifacts"
base: main
labels: build
draft: false
- if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"