Skip to content

fix: release notes with sha 256 #33

fix: release notes with sha 256

fix: release notes with sha 256 #33

Workflow file for this run

---
name: Pre-commit Checks
"on":
push:
branches: [main, develop, "support-*", "feature-*", "hotfix-*"]
pull_request:
branches: [main, develop]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-
- name: Install pre-commit hooks
run: pre-commit install
- name: Run pre-commit on all files
run: pre-commit run --all-files --show-diff-on-failure
- name: Upload pre-commit results
if: failure()
uses: actions/upload-artifact@v4
with:
name: pre-commit-results
path: |
.pre-commit.log
**/*.log
retention-days: 7
markdown-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Create markdownlint config
run: |
cat > .markdownlint.json << EOF
{
"MD013": false,
"MD033": false,
"MD041": false
}
EOF
- name: Lint Markdown files
run: |
if find . -name "*.md" | grep -q .; then
markdownlint . --ignore node_modules --ignore .git
else
echo "No Markdown files found to lint"
fi
continue-on-error: true
yaml-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install yamllint
run: |
python -m pip install --upgrade pip
pip install yamllint
- name: Create yamllint config
run: |
cat > .yamllint.yml << EOF
extends: default
rules:
line-length:
max: 120
indentation:
spaces: 2
comments:
min-spaces-from-content: 1
EOF
- name: Lint YAML files
run: |
if find . -name "*.yml" -o -name "*.yaml" | grep -q .; then
yamllint .
else
echo "No YAML files found to lint"
fi
security-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
check-status:
runs-on: ubuntu-latest
needs: [pre-commit, markdown-lint, yaml-lint, security-scan]
if: always()
steps:
- name: Check all jobs status
run: |
echo "Pre-commit: ${{ needs.pre-commit.result }}"
echo "Markdown lint: ${{ needs.markdown-lint.result }}"
echo "YAML lint: ${{ needs.yaml-lint.result }}"
echo "Security scan: ${{ needs.security-scan.result }}"
if [[ "${{ needs.pre-commit.result }}" == "failure" ]]; then
echo "❌ Pre-commit checks failed - this is a blocking failure"
exit 1
fi
if [[ "${{ needs.security-scan.result }}" == "failure" ]]; then
echo "❌ Security scan found issues - please review"
exit 1
fi
echo "✅ All critical checks passed!"