Skip to content

Commit 0c2c9cb

Browse files
committed
Add Github Actions workflow for config checks
Signed-off-by: Christopher Desiniotis <[email protected]>
1 parent 4f11a0e commit 0c2c9cb

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/config.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright 2024 NVIDIA CORPORATION
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Config
16+
17+
on:
18+
pull_request:
19+
types:
20+
- opened
21+
- synchronize
22+
branches:
23+
- master
24+
- release-*
25+
push:
26+
branches:
27+
- master
28+
- release-*
29+
30+
jobs:
31+
helm-lint:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
- name: Install Helm
37+
uses: azure/[email protected]
38+
id: install
39+
- run: helm lint deployments/gpu-operator/
40+
validate-csv:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
- name: Get Golang version
46+
id: vars
47+
run: |
48+
GOLANG_VERSION=$( grep "GOLANG_VERSION ?=" versions.mk )
49+
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
50+
- name: Install Go
51+
uses: actions/setup-go@v5
52+
with:
53+
go-version: ${{ env.GOLANG_VERSION }}
54+
- run: make validate-csv
55+
validate-helm-values:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v4
60+
- name: Get Golang version
61+
id: vars
62+
run: |
63+
GOLANG_VERSION=$( grep "GOLANG_VERSION ?=" versions.mk )
64+
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
65+
- name: Install Go
66+
uses: actions/setup-go@v5
67+
with:
68+
go-version: ${{ env.GOLANG_VERSION }}
69+
- run: make validate-helm-values

0 commit comments

Comments
 (0)