-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
4,502 additions
and
324 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Pre-Commit Checks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run pre-commit hooks | ||
run: | | ||
git fetch origin main || git fetch origin master | ||
base_commit=$(git rev-parse --verify origin/main || git rev-parse --verify origin/master || echo "") | ||
if [ -z "$base_commit" ]; then | ||
files=$(git ls-files '*.yaml' '*.md') | ||
else | ||
files=$(git diff --name-only "$base_commit" -- '*.yaml' '*.md') | ||
fi | ||
if [ -n "$files" ]; then | ||
echo "$files" | xargs pre-commit run --files | ||
else | ||
echo "No YAML or Markdown files to lint" | ||
fi |
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,16 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: check-yaml | ||
exclude: packages/apps/postgres/templates/init-script.yaml | ||
args: [--unsafe] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.41.0 | ||
hooks: | ||
- id: markdownlint | ||
args: [--fix, --disable, MD013, MD041, --] |
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,23 @@ | ||
#!/bin/bash | ||
|
||
YQ_VERSION="v4.35.1" | ||
RED='\033[31m' | ||
RESET='\033[0m' | ||
|
||
check-yq-version() { | ||
current_version=$(yq -V | grep -oP 'v[0-9]+\.[0-9]+\.[0-9]+') | ||
if [ -z "$current_version" ]; then | ||
echo "yq is not installed or version cannot be determined." | ||
exit 1 | ||
fi | ||
echo "Current yq version: $current_version" | ||
|
||
if [ "$(printf '%s\n' "$YQ_VERSION" "$current_version" | sort -V | head -n1)" = "$YQ_VERSION" ]; then | ||
echo "Greater than or equal to $YQ_VERSION" | ||
else | ||
echo -e "${RED}ERROR: yq version less than $YQ_VERSION${RESET}" | ||
exit 1 | ||
fi | ||
} | ||
|
||
check-yq-version |
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,9 @@ | ||
### How to test packages local | ||
|
||
```bash | ||
cd packages/core/installer | ||
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY | ||
make apply | ||
kubectl delete pod dashboard-redis-master-0 -n cozy-dashboard | ||
kubectl delete po -l app=source-controller -n cozy-fluxcd | ||
``` |
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 +1 @@ | ||
ghcr.io/aenix-io/cozystack/cluster-autoscaler:0.12.0@sha256:7f617de5a24de790a15d9e97c6287ff2b390922e6e74c7a665cbf498f634514d | ||
ghcr.io/aenix-io/cozystack/cluster-autoscaler:0.12.1@sha256:7f617de5a24de790a15d9e97c6287ff2b390922e6e74c7a665cbf498f634514d |
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 +1 @@ | ||
ghcr.io/aenix-io/cozystack/kubevirt-cloud-provider:0.12.0@sha256:df4a937b6fb2b345110174227170691d48189ffe1900c3f848cd5085990a58df | ||
ghcr.io/aenix-io/cozystack/kubevirt-cloud-provider:0.12.1@sha256:ca606d6039ed43a48d4dfd98a91fd3cec120f08c1e221cd4e99ea94239389742 |
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 +1 @@ | ||
ghcr.io/aenix-io/cozystack/kubevirt-csi-driver:0.12.0@sha256:86029548078960feecca116087b2135230d676b83c503f292eb50e1199be2790 | ||
ghcr.io/aenix-io/cozystack/kubevirt-csi-driver:0.12.1@sha256:86029548078960feecca116087b2135230d676b83c503f292eb50e1199be2790 |
Oops, something went wrong.