Skip to content

Remove redundant wellKnown fields from funding.json #92

Remove redundant wellKnown fields from funding.json

Remove redundant wellKnown fields from funding.json #92

name: Build and Notify
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build_and_notify:
runs-on: ubuntu-latest
steps:
# ---------------------------------
# 0️⃣ Checkout
# ---------------------------------
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log checkout info
run: |
echo "Repository checked out"
echo "Commit SHA: $GITHUB_SHA"
echo "Branch: $GITHUB_REF"
# ---------------------------------
# 1️⃣ Detect docs changes
# ---------------------------------
- name: Detect docs changes
id: detect_docs
run: |
BASE="${{ github.event.before }}"
HEAD="${{ github.sha }}"
if [ "$BASE" = "0000000000000000000000000000000000000000" ]; then
BASE="$(git rev-list --max-parents=0 HEAD)"
fi
if git diff --name-only "$BASE" "$HEAD" | grep -q '^docs/'; then
echo "DOCS_CHANGED=true" >> "$GITHUB_ENV"
else
echo "DOCS_CHANGED=false" >> "$GITHUB_ENV"
fi
# Save commits to environment for Python script
echo "BASE_COMMIT=$BASE" >> "$GITHUB_ENV"
echo "HEAD_COMMIT=$HEAD" >> "$GITHUB_ENV"
# ---------------------------------
# 2️⃣ Enforce commit policy & send Discord
# ---------------------------------
- name: Enforce commit policy and notify
env:
DOCS_CHANGED: ${{ env.DOCS_CHANGED }}
BASE_COMMIT: ${{ env.BASE_COMMIT }}
HEAD_COMMIT: ${{ env.HEAD_COMMIT }}
DISCORD_WEBHOOK_GENERAL: ${{ secrets.DISCORD_WEBHOOK_GENERAL }}
DISCORD_WEBHOOK_LLVM_DISCUSSION: ${{ secrets.DISCORD_WEBHOOK_LLVM_DISCUSSION }}
run: |
python3 .ci/commit_policy.py
# ---------------------------------
# 3️⃣ Build project
# ---------------------------------
- name: Build project
run: |
echo "Starting build"
echo "Build completed successfully"
# ---------------------------------
# 4️⃣ Notify pipeline completion
# ---------------------------------
- name: Notify
run: |
echo "Documentation changed: $DOCS_CHANGED"
echo "CI pipeline finished"