playbook/.gitea/workflows/standards-check.yml

37 lines
962 B
YAML

name: ✅ Standards Check
on:
push:
pull_request:
workflow_dispatch: # 允许手动触发
concurrency:
group: standards-${{ github.repository }}-${{ github.ref }}
cancel-in-progress: true
# ==========================================
# 🔧 配置区域 - 标准校验参数
# ==========================================
env:
COMMIT_LINT_REQUIRE_EMOJI: "1"
WORKSPACE_DIR: "/home/workspace"
jobs:
commit-message:
name: 🔍 Commit message lint
runs-on: ubuntu-22.04
steps:
- name: 📥 准备仓库
env:
REPO_NAME: ${{ github.event.repository.name }}
TOKEN: ${{ secrets.WORKFLOW }}
TARGET_SHA: ${{ github.sha }}
TARGET_REF: ${{ github.ref }}
TARGET_REF_NAME: ${{ github.ref_name }}
run: bash .gitea/ci/prepare_repo.sh
- name: 🧪 Lint commit message / PR title
run: |
cd "$REPO_DIR"
python3 .gitea/ci/commit_message_lint.py