mirror of
https://github.com/google/adk-docs.git
synced 2026-09-14 16:16:59 +08:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Generate Version Report
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
version-check:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Generate version report
|
|
run: python scripts/generate_version_report.py
|
|
|
|
- name: Check for changes
|
|
id: git_status
|
|
run: |
|
|
if git diff --quiet -- docs_health_report.md; then
|
|
echo "No changes to report."
|
|
echo "changed=false" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "Version report has changed."
|
|
echo "changed=true" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Commit and push changes
|
|
if: steps.git_status.outputs.changed == 'true'
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add docs_health_report.md
|
|
git commit -m "docs: Update version report"
|
|
git push
|