Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Commit 4a251de

Browse files
committed
Add comprehensive DevOps improvements and modernization
This commit implements a complete set of DevOps best practices and modernization improvements to enhance repository quality, security, and maintainability. Key additions: CI/CD Automation: - Add GitHub Actions workflows for automated testing and validation - Link checker to catch broken documentation URLs - Markdown linting for consistent documentation formatting - Python linting (Ruff, Black, isort) for code quality - YAML validation for configuration files - Spell checking to catch typos Security Enhancements: - Add Dependabot configuration for automated dependency updates - Implement CodeQL security scanning workflow - Pin Python dependencies to specific versions (requests==2.31.0, PyGithub==2.1.1) - Add security policy (SECURITY.md) with vulnerability reporting process - Configure Bandit security linter for Python code Development Experience: - Add pre-commit hooks configuration for local development - Create .editorconfig for consistent code formatting across editors - Add pyproject.toml for Python tooling configuration - Improve .gitignore with comprehensive Python and development patterns Community & Documentation: - Add CODE_OF_CONDUCT.md following Contributor Covenant 2.0 - Add SUPPORT.md with comprehensive help resources - Add CHANGELOG.md following Keep a Changelog format - Enhance README with prominent deprecation notice and version matrix - Add compatibility information for OpenFaaS, Kubernetes, and Python versions Configuration Files: - .markdownlint.json: Markdown linting rules - .yamllint.yml: YAML validation configuration - .typos.toml: Spell checking configuration - pyproject.toml: Python tooling (Ruff, Black, isort, Bandit) These improvements bring the repository up to modern DevOps standards while maintaining backward compatibility with the existing workshop content. Addresses repository modernization and security best practices.
1 parent 29cd6ed commit 4a251de

22 files changed

Lines changed: 1101 additions & 10 deletions

.editorconfig

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
13+
# Markdown files
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
max_line_length = off
17+
18+
# Python files
19+
[*.py]
20+
indent_style = space
21+
indent_size = 4
22+
max_line_length = 100
23+
24+
# YAML files
25+
[*.{yml,yaml}]
26+
indent_style = space
27+
indent_size = 2
28+
29+
# JSON files
30+
[*.json]
31+
indent_style = space
32+
indent_size = 2
33+
34+
# Shell scripts
35+
[*.sh]
36+
indent_style = space
37+
indent_size = 2
38+
39+
# Dockerfile
40+
[Dockerfile]
41+
indent_style = space
42+
indent_size = 2
43+
44+
# Makefiles
45+
[Makefile]
46+
indent_style = tab
47+
48+
# TOML files
49+
[*.toml]
50+
indent_style = space
51+
indent_size = 2

.github/dependabot.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions dependencies
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
open-pull-requests-limit: 10
10+
labels:
11+
- "dependencies"
12+
- "github-actions"
13+
commit-message:
14+
prefix: "chore"
15+
include: "scope"
16+
17+
# Python dependencies
18+
- package-ecosystem: "pip"
19+
directory: "/astronaut-finder"
20+
schedule:
21+
interval: "weekly"
22+
day: "monday"
23+
open-pull-requests-limit: 5
24+
labels:
25+
- "dependencies"
26+
- "python"
27+
commit-message:
28+
prefix: "chore"
29+
include: "scope"
30+
31+
- package-ecosystem: "pip"
32+
directory: "/issue-bot/bot-handler"
33+
schedule:
34+
interval: "weekly"
35+
day: "monday"
36+
open-pull-requests-limit: 5
37+
labels:
38+
- "dependencies"
39+
- "python"
40+
commit-message:
41+
prefix: "chore"
42+
include: "scope"
43+
44+
- package-ecosystem: "pip"
45+
directory: "/issue-bot-secrets/bot-handler"
46+
schedule:
47+
interval: "weekly"
48+
day: "monday"
49+
open-pull-requests-limit: 5
50+
labels:
51+
- "dependencies"
52+
- "python"
53+
commit-message:
54+
prefix: "chore"
55+
include: "scope"

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL Security Scan"
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
schedule:
9+
# Run weekly on Monday at 00:00 UTC
10+
- cron: '0 0 * * 1'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: ['python']
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: ${{ matrix.language }}
34+
queries: +security-extended,security-and-quality
35+
36+
- name: Autobuild
37+
uses: github/codeql-action/autobuild@v3
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: "/language:${{ matrix.language }}"

.github/workflows/link-checker.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Link Checker
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
schedule:
9+
# Run weekly on Monday at 00:00 UTC
10+
- cron: '0 0 * * 1'
11+
12+
jobs:
13+
linkChecker:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Link Checker
20+
uses: lycheeverse/lychee-action@v1
21+
with:
22+
args: --verbose --no-progress '**/*.md' '**/*.html' --exclude-mail --exclude-path './node_modules' --exclude-path './vendor'
23+
fail: true
24+
env:
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: Create Issue on Failure
28+
if: failure()
29+
uses: actions/github-script@v7
30+
with:
31+
script: |
32+
github.rest.issues.create({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
title: 'Link Checker Failed - Broken Links Detected',
36+
body: 'The link checker workflow has detected broken links in the documentation. Please review the workflow logs for details.',
37+
labels: ['documentation', 'bug']
38+
})
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Markdown Lint
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
markdown-lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Run markdownlint
17+
uses: DavidAnson/markdownlint-cli2-action@v15
18+
with:
19+
globs: '**/*.md'
20+
config: '.markdownlint.json'

.github/workflows/python-lint.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Python Lint
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
python-lint:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9', '3.10', '3.11', '3.12']
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install linting dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install ruff black isort
29+
30+
- name: Run Ruff linter
31+
run: |
32+
ruff check . --exclude translations/
33+
34+
- name: Run Black formatter check
35+
run: |
36+
black --check . --exclude translations/
37+
38+
- name: Run isort import checker
39+
run: |
40+
isort --check-only . --skip translations/
41+
42+
python-security:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v4
47+
48+
- name: Set up Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: '3.11'
52+
53+
- name: Install bandit
54+
run: |
55+
pip install bandit[toml]
56+
57+
- name: Run Bandit security linter
58+
run: |
59+
bandit -r . -f json -o bandit-report.json || true
60+
bandit -r . --exclude ./translations/

.github/workflows/spell-check.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Spell Check
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
spellcheck:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Check spelling
17+
uses: crate-ci/typos@master
18+
with:
19+
files: '*.md **/*.md **/*.py'
20+
config: .typos.toml

.github/workflows/yaml-lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: YAML Lint
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
yaml-lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Run yamllint
17+
uses: ibiqlik/action-yamllint@v3
18+
with:
19+
config_file: .yamllint.yml
20+
file_or_dir: .
21+
strict: true

0 commit comments

Comments
 (0)