This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions <action@github.com>
- Loading branch information
1 parent
0893659
commit eae0a53
Showing
10 changed files
with
173 additions
and
33 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl@5.8.0 | ||
# | ||
name: 'Check if values schema file has been updated' | ||
on: pull_request | ||
|
||
jobs: | ||
check: | ||
name: 'Check values.yaml and its schema in PR' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v3 | ||
- name: 'Check if values.schema.json was updated' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
VALUES_FILE_CHANGED="false" | ||
SCHEMA_FILE_CHANGED="false" | ||
echo "Comparing ${GITHUB_BASE_REF}...${GITHUB_HEAD_REF}" | ||
changed_files=$(gh api "repos/{owner}/{repo}/compare/${GITHUB_BASE_REF}...${GITHUB_HEAD_REF}" --jq ".files[] | .filename") | ||
if grep -q "values.schema.json" <<< $(git ls-tree -r --name-only ${GITHUB_SHA}); then | ||
if grep -q "values.yaml" <<< "${changed_files}" ; then | ||
VALUES_FILE_CHANGED="true" | ||
fi | ||
if grep -q "values.schema.json" <<< "${changed_files}" ; then | ||
SCHEMA_FILE_CHANGED="true" | ||
fi | ||
if [ $VALUES_FILE_CHANGED != $SCHEMA_FILE_CHANGED ]; then | ||
echo "FAILED: values.yaml was updated but values.schema.json hasn't been regenerated" | ||
echo "Please refer to this document: https://intranet.giantswarm.io/docs/organizational-structure/teams/cabbage/app-updates/helm-values-schema/" | ||
exit 1 | ||
fi | ||
echo "PASSED: values.yaml and values.schema.json both appear to have been updated" | ||
exit 0 | ||
fi | ||
echo "INFO: values.schema.json not present in this repo - nothing to do" |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl@4.20.1 | ||
# devctl@5.8.0 | ||
# | ||
name: gitleaks | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This file is generated by https://github.com/giantswarm/github | ||
# Repository specific ignores should be added to .nancy-ignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
minimum_pre_commit_version: '2.17' | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: no-commit-to-branch | ||
args: [--branch, master, --branch, main, --pattern, release-*] | ||
- id: check-merge-conflict | ||
- repo: https://github.com/tekwizely/pre-commit-golang | ||
rev: v0.8.1 | ||
hooks: | ||
- id: go-test-repo-mod | ||
- repo: git://github.com/dnephin/pre-commit-golang | ||
rev: ac0f6582d2484b3aa90b05d568e70f9f3c1374c7 | ||
hooks: | ||
- id: go-imports | ||
- id: golangci-lint | ||
- id: go-build | ||
- id: go-mod-tidy | ||
# shell scripts | ||
- repo: https://github.com/detailyang/pre-commit-shell | ||
rev: 1.0.5 | ||
hooks: | ||
- id: shell-lint | ||
args: [ --format=json ] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-added-large-files | ||
# check for unresolved merge conflicts | ||
- id: check-merge-conflict | ||
- id: check-shebang-scripts-are-executable | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.0 | ||
hooks: | ||
- id: go-fmt | ||
- id: go-mod-tidy | ||
- id: golangci-lint | ||
# timeout is needed for CI | ||
args: [ -E, gosec, -E, goconst, -E, govet, --timeout, 300s ] | ||
- id: go-imports | ||
args: [ -local, github.com/giantswarm/kvm-operator ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl@4.20.1 | ||
# devctl@5.8.0 | ||
# | ||
|
||
include Makefile.*.mk | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl@4.20.1 | ||
# devctl@5.8.0 | ||
# | ||
|
||
##@ App | ||
|
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