3
3
on : ['push', 'pull_request']
4
4
5
5
jobs :
6
- test :
6
+
7
+ golang-test :
8
+ name : Golang Test
7
9
runs-on : ubuntu-22.04
8
10
strategy :
9
11
matrix :
29
31
name : Go-results-${{ matrix.go-version }}
30
32
path : TestResults-${{ matrix.go-version }}.json
31
33
32
- linting :
33
- name : Lint Code Base
34
+ golang-lint :
35
+ name : Golang Lint
36
+ runs-on : ubuntu-22.04
37
+ steps :
38
+ - uses : actions/checkout@v3
39
+ - uses : actions/setup-go@v4
40
+ with :
41
+ go-version : ' 1.21'
42
+ cache : false
43
+ - name : golangci-lint
44
+ uses : golangci/golangci-lint-action@v3
45
+ with :
46
+ # Require: The version of golangci-lint to use.
47
+ # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
48
+ # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
49
+ version : v1.54
50
+
51
+ # Optional: working directory, useful for monorepos
52
+ # working-directory: somedir
53
+
54
+ # Optional: golangci-lint command line arguments.
55
+ #
56
+ # Note: By default, the `.golangci.yml` file should be at the root of the repository.
57
+ # The location of the configuration file can be changed by using `--config=`
58
+ # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
59
+ args : --timeout=30m
60
+
61
+ # Optional: show only new issues if it's a pull request. The default value is `false`.
62
+ # only-new-issues: true
63
+
64
+ # Optional: if set to true, then all caching functionality will be completely disabled,
65
+ # takes precedence over all other caching options.
66
+ # skip-cache: true
67
+
68
+ # Optional: if set to true, then the action won't cache or restore ~/go/pkg.
69
+ # skip-pkg-cache: true
70
+
71
+ # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
72
+ # skip-build-cache: true
73
+
74
+ # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
75
+ # install-mode: "goinstall"
76
+
77
+ markdown-lint :
78
+ name : Markdown Lint
34
79
runs-on : ubuntu-22.04
35
80
steps :
36
81
- name : Checkout Code
@@ -47,12 +92,14 @@ jobs:
47
92
LINTER_RULES_PATH : /
48
93
MARKDOWN_CONFIG_FILE : .markdownlint.yml
49
94
50
- deploy-quay :
51
- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'zncdata-labs/spark-k8s-operator'
95
+ deploy-operator :
96
+ name : Deploy operator
97
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'zncdata-labs'
52
98
runs-on : ubuntu-22.04
53
99
needs :
54
- - test
55
- - linting
100
+ - golang-test
101
+ - markdown-lint
102
+ - golang-lint
56
103
steps :
57
104
- uses : actions/checkout@v3
58
105
with :
61
108
uses : docker/setup-qemu-action@v3
62
109
- name : Set up Docker Buildx
63
110
uses : docker/setup-buildx-action@v3
111
+ with :
112
+ platforms : linux/amd64,linux/arm64
64
113
- name : Login to quay.io
65
114
uses : docker/login-action@v2
66
115
with :
76
125
run : |
77
126
make bundle
78
127
make bundle-buildx
128
+
0 commit comments