Skip to content

Commit 0279eda

Browse files
committed
updated present workflows under .github
1 parent 6725282 commit 0279eda

2 files changed

Lines changed: 93 additions & 4 deletions

File tree

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,53 @@
11
name: Examples Validation
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
48

59
jobs:
6-
echo:
10+
validate-workflows:
711
runs-on: ubuntu-latest
12+
813
steps:
9-
- name: Say hello from examples-validation
10-
run: echo "✅ This workflow is active: examples-validation"
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Validate workflow structure
18+
run: |
19+
echo "📋 Validating workflow collection structure..."
20+
21+
# Check if all required directories exist
22+
directories=("workflows/automation" "workflows/ci-cd" "workflows/code-quality" "workflows/maintenance" "workflows/templates")
23+
24+
for dir in "${directories[@]}"; do
25+
if [ -d "$dir" ]; then
26+
echo "✅ Found: $dir"
27+
else
28+
echo "❌ Missing: $dir"
29+
exit 1
30+
fi
31+
done
32+
33+
- name: Count workflows
34+
run: |
35+
echo "📊 Workflow Statistics:"
36+
echo "Automation workflows: $(ls -1 workflows/automation/*.yml 2>/dev/null | wc -l)"
37+
echo "CI/CD workflows: $(ls -1 workflows/ci-cd/*.yml 2>/dev/null | wc -l)"
38+
echo "Code Quality workflows: $(ls -1 workflows/code-quality/*.yml 2>/dev/null | wc -l)"
39+
echo "Maintenance workflows: $(ls -1 workflows/maintenance/*.yml 2>/dev/null | wc -l)"
40+
echo "Template workflows: $(ls -1 workflows/templates/*.yml 2>/dev/null | wc -l)"
41+
42+
- name: Validate README
43+
run: |
44+
echo "📖 Validating README..."
45+
if [ -f "README.md" ]; then
46+
echo "✅ README.md exists"
47+
else
48+
echo "❌ README.md not found"
49+
exit 1
50+
fi
51+
52+
- name: Examples Validation Success
53+
run: echo "✅ Repository structure validation completed successfully!"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Template Lint
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/*.yml'
7+
- '.github/ISSUE_TEMPLATE/*.md'
8+
pull_request:
9+
paths:
10+
- '.github/workflows/*.yml'
11+
- '.github/ISSUE_TEMPLATE/*.md'
12+
13+
jobs:
14+
lint-workflows:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Validate workflow syntax
22+
run: |
23+
echo "🔍 Validating GitHub Actions workflow syntax..."
24+
for workflow in .github/workflows/*.yml; do
25+
echo "Checking: $workflow"
26+
if grep -q "name:" "$workflow"; then
27+
echo "✅ $workflow is valid"
28+
else
29+
echo "❌ $workflow is missing 'name' field"
30+
exit 1
31+
fi
32+
done
33+
34+
- name: Lint issue templates
35+
run: |
36+
echo "🔍 Validating issue templates..."
37+
for template in .github/ISSUE_TEMPLATE/*.md; do
38+
if grep -q "name:" "$template"; then
39+
echo "✅ $template is valid"
40+
else
41+
echo "⚠️ Warning: $template might be missing frontmatter"
42+
fi
43+
done
44+
45+
- name: Lint Success
46+
run: echo "✅ All templates and workflows passed linting!"

0 commit comments

Comments
 (0)