Skip to content

Updated Kogito operator version for CVE-2024-28182 #32

Updated Kogito operator version for CVE-2024-28182

Updated Kogito operator version for CVE-2024-28182 #32

name: Kogito Operator PR Checks
on:
pull_request:
paths-ignore:
- "README.md"
- "RELEASE_NOTES.md"
- "examples/**"
- "LICENSE"
- "Makefile"
env:
GO_VERSION: 1.17
jobs:
golint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod/cache
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-cache-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ env.GO_VERSION }}-cache-
- name: Cache the binaries
uses: actions/cache@v1
with:
path: ~/go/bin/
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-v1-${{ hashFiles(format('{0}/bin', env.GOPATH)) }}
restore-keys: |
${{ runner.os }}-go-${{ env.GO_VERSION }}-v1-${{ hashFiles(format('{0}/bin', env.GOPATH)) }}
- name: Install Operator-sdk
run: ./hack/ci/install-operator-sdk.sh
- name: Check Vet
run: |
make vet
git diff
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|kogito-operator.yaml\|go.tools.mod\|go.tools.sum' || :)
generated_changed_files=$(git status -s | grep zz_generated || :)
[[ -z "$generated_changed_files" ]] || (printf "There is change in auto-generated files, Please make sure to upgrade openapi-gen" && exit 1)
[[ -z "$changed_files" ]] || (printf "Change is detected in some files: \n$changed_files\n Did you run 'make vet' before sending the PR?" && exit 1)
- name: Check Headers
run: |
./hack/addheaders.sh
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|kogito-operator.yaml\|go.tools.mod\|go.tools.sum' || :)
[[ -z "$changed_files" ]] || (printf "Some files are missing the headers: \n$changed_files\n Did you run 'make test' before sending the PR" && exit 1)
- name: Check Formatting
run: |
./hack/go-fmt.sh
changed_files=$(git status -s | grep -v 'go.mod\|go.sum\|kogito-operator.yaml\|go.tools.mod\|go.tools.sum' || :)
[[ -z "$changed_files" ]] || (printf "Some files are not formatted properly: \n$changed_files\n Did you run 'make test' before sending the PR?" && exit 1)
- name: Check lint
run: ./hack/go-lint.sh
bats_test:
name: Bats Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Cache the binaries
uses: actions/cache@v1
with:
path: ~/go/bin/
key: ${{ runner.os }}-go-${{ env.GO_VERSION }}
restore-keys: |
${{ runner.os }}-go-${{ env.GO_VERSION }}
- name: Setup Bats
run: |
git clone https://github.com/bats-core/bats-core.git
cd bats-core && ./install.sh $HOME
- name: Run Bats
run: $HOME/bin/bats hack/*.bats