* feat: use existing pre-commit framework * feat(ci): add github action for password_check * feat: add some simple tests to password_check.py * fix: set `backend_password_secret` in default values.yaml to an allowed password
41 lines
878 B
YAML
41 lines
878 B
YAML
name: Password Check
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- '*.yaml'
|
|
- '*.yml'
|
|
pull_request:
|
|
paths:
|
|
- '*.yaml'
|
|
- '*.yml'
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd backend/
|
|
python -m pip install --upgrade pip
|
|
pip install pyyaml
|
|
|
|
- name: Password Check
|
|
run: |
|
|
CHANGED_FILES=$(git diff --name-only HEAD^..HEAD)
|
|
echo $CHANGED_FILES
|
|
YML_FILES=$(echo "$CHANGED_FILES" | { grep ".yml$\|.yaml$" || true; })
|
|
if [[ -n "$YML_FILES" ]]; then
|
|
python3 scripts/check_passwords.py $YML_FILES
|
|
fi
|