|
| 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 | + |
| 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