Add relevant helm template support to ibm-licensing-operator #1767
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2023 IBM Corporation | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http:#www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- latest | |
- release-* | |
pull_request: | |
workflow_dispatch: | |
env: | |
GO_VERSION: "1.23" | |
GOLANGCI_LINT_VERSION: 1.62.2 | |
jobs: | |
detect-docs-only-changes: | |
runs-on: ubuntu-22.04 | |
outputs: | |
should_skip: ${{ steps.detect-docs-only-changes.outputs.should_skip }} | |
steps: | |
- name: Detect Documentation-only Changes | |
id: ddoc | |
uses: fkirc/[email protected] | |
with: | |
skip_after_successful_duplicate: 'true' | |
paths_ignore: '["docs/**", "**.md", "**.png", "**.jpg"]' | |
do_not_skip: '["workflow_dispatch", "schedule", "push", "pull_request"]' | |
concurrent_skipping: 'never' | |
check: | |
name: Check | |
runs-on: ubuntu-22.04 | |
# This image moves up to ubuntu focal and node 20.18.0. | |
container: | |
image: quay.io/cicdtest/check-tool:v20241203-df2ce26d0 | |
steps: | |
- name: Check Node.js and GLIBC versions | |
run: | | |
node -v | |
ldd --version | |
# it must be v3 to avoid fetching dependencies using newer version of GLIBC | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 # Fetch only the latest commit | |
- name: Install golangci-lint v${{ env.GOLANGCI_LINT_VERSION }} | |
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v${{ env.GOLANGCI_LINT_VERSION }} | |
# add flag to get rid of the version control warning | |
- name: Check | |
run: | | |
go env -w GOFLAGS=-buildvcs=false | |
make check | |
build: | |
needs: detect-docs-only-changes | |
if: needs.detect-docs-only-changes.outputs.should_skip != 'true' | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up Go ${{ env.GO_VERSION }} | |
uses: actions/[email protected] | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 # Fetch only the latest commit | |
- name: Find the Go Build Cache | |
id: go | |
run: echo "::set-output name=cache::$(go env GOCACHE)" | |
- name: Cache the Go Build Cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.go.outputs.cache }} | |
key: ${{ runner.os }}-build-check-diff-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-build-check-diff- | |
fetch-depth: 1 # Fetch only the latest commit | |
- name: Cache Go Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .work/pkg | |
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-pkg- | |
- name: Build | |
run: make build |