Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added yamllint, fixed current linting errors, added github action #1727 #2013

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,37 @@ updates:
schedule:
interval: "daily"
ignore:
# Ignore controller-runtime as its upgraded manually.
- dependency-name: "sigs.k8s.io/controller-runtime"
# Ignore cluster-api as its upgraded manually.
- dependency-name: "sigs.k8s.io/cluster-api/*"
# Ignore k8s and its transitives modules as they are upgraded manually
# together with controller-runtime.
- dependency-name: "k8s.io/*"
- dependency-name: "github.com/onsi/*"
# Ignore controller-runtime as its upgraded manually.
- dependency-name: "sigs.k8s.io/controller-runtime"
# Ignore cluster-api as its upgraded manually.
- dependency-name: "sigs.k8s.io/cluster-api/*"
# Ignore k8s and its transitives modules as they are upgraded manually
# together with controller-runtime.
- dependency-name: "k8s.io/*"
- dependency-name: "github.com/onsi/*"
labels:
- "ok-to-test"

# Enable version updates for Go tools
- package-ecosystem: "gomod"
directory: "/hack/tools"
schedule:
interval: "weekly"
ignore:
# Ignore controller-runtime as its upgraded manually.
- dependency-name: "sigs.k8s.io/controller-runtime/*"
# Ignore cluster-api as its upgraded manually.
- dependency-name: "sigs.k8s.io/cluster-api/*"
- dependency-name: "sigs.k8s.io/controller-tools"
# Ignore k8s and its transitives modules as they are upgraded manually
# together with controller-runtime.
- dependency-name: "k8s.io/*"
- dependency-name: "github.com/onsi/*"
# Ignore controller-runtime as its upgraded manually.
- dependency-name: "sigs.k8s.io/controller-runtime/*"
# Ignore cluster-api as its upgraded manually.
- dependency-name: "sigs.k8s.io/cluster-api/*"
- dependency-name: "sigs.k8s.io/controller-tools"
# Ignore k8s and its transitives modules as they are upgraded manually
# together with controller-runtime.
- dependency-name: "k8s.io/*"
- dependency-name: "github.com/onsi/*"
labels:
- "ok-to-test"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "/hack/ccm"
schedule:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/validate_yaml_manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint
on: [push, pull_request]
jobs:
yamllint:
name: Run yamllint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7
with:
ref: ${{ matrix.branch }}
- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: Install yamllint
run: make install-yamllint
- name: Run yamllint
run: make lint-yaml
- name: Format Yaml files
run: make format-yaml-files
31 changes: 14 additions & 17 deletions .github/workflows/weekly-security-scan.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
name: Weekly security scan

on:
schedule:
# Cron for every Monday at 2:00 UTC.
- cron: "0 2 * * 1"

# Remove all permissions from GITHUB_TOKEN except metadata.
permissions: {}

jobs:
scan:
strategy:
fail-fast: false
matrix:
branch: [ main, release-0.8, release-0.7 ]
branch: [main, release-0.8, release-0.7]
name: Trivy
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7
with:
ref: ${{ matrix.branch }}
- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: Run verify security target
run: make verify-security
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag=v4.1.7
with:
ref: ${{ matrix.branch }}
- name: Calculate go version
id: vars
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # tag=v5.0.2
with:
go-version: ${{ steps.vars.outputs.go_version }}
- name: Run verify security target
run: make verify-security
Loading