Skip to content

Update LENGTH() function description for clarity #45

Update LENGTH() function description for clarity

Update LENGTH() function description for clarity #45

name: Generate Help Tables SQL
on:
push:
paths:
- 'server/reference/**/*.md'
- 'help-tables/markdown_extractor.py'
pull_request:
paths:
- 'server/reference/**/*.md'
- 'help-tables/markdown_extractor.py'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run generator
run: python help-tables/markdown_extractor.py
- name: Verify output exists
run: |
if [ ! -f help-tables/fill_help_tables.sql ]; then
echo "Error: fill_help_tables.sql was not generated"
exit 1
fi
echo "Generated $(wc -l < help-tables/fill_help_tables.sql) INSERT statements"
echo ""
echo "=== First 5 statements ==="
head -5 help-tables/fill_help_tables.sql
echo ""
echo "=== Last 5 statements ==="
tail -5 help-tables/fill_help_tables.sql
- name: Validate SQL output
run: python help-tables/validate_sql.py help-tables/fill_help_tables.sql
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: fill_help_tables
path: help-tables/fill_help_tables.sql
retention-days: 30
notify:
runs-on: ubuntu-latest
needs: generate
if: failure()
steps:
- name: Notify Slack on failure
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"text": "❌ *Help Tables SQL generation failed*\n*Repo:* ${{ github.repository }}\n*Branch:* ${{ github.ref_name }}\n*Commit:* ${{ github.sha }}\n*Pushed by:* ${{ github.actor }}\n*Run:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}