-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (87 loc) · 2.39 KB
/
pr-check.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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: pr_check elasticobjects-operator
on:
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- 'helm/**'
- '.github/**'
types:
- opened
- reopened
- edited
- synchronize
concurrency:
group: ci-tests-${{ inputs.git_repo }}-${{ github.ref }}-1
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install latest major GO version
uses: actions/setup-go@v4
with:
go-version: '1.21' # The Go version to download
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: 'v1.55'
working-directory: '.'
args: --allow-parallel-runners -v --timeout 5m
skip-pkg-cache: true
skip-build-cache: true
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install latest major GO version
uses: actions/setup-go@v4
with:
go-version: '1.21' # The Go version to download
- name: Build executables locally
run: |
make build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASS }}
- name: Dockerise
uses: docker/build-push-action@v5
with:
context: ./
builder: ${{ steps.buildx.outputs.name }}
platforms: 'linux/amd64,linux/arm64'
tags: kafkaobjects-operator:dev
file: Dockerfile
push: false
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install latest major GO version
uses: actions/setup-go@v4
with:
go-version: '1.21' # The Go version to download
- name: Test locally
run:
make test