Skip to content

Auto Update System Prompt Library #19

Auto Update System Prompt Library

Auto Update System Prompt Library #19

name: Auto Update System Prompt Library
on:
schedule:
# Run daily at 3:00 AM UTC
- cron: '0 3 * * *'
workflow_dispatch:
# Allow manual triggering
jobs:
update-indices:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Update library indices
run: |
# Run the update script with force-rebuild
./update_library.sh --force-rebuild
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Commit and push changes
run: |
# Check if there are changes to commit
if git status --porcelain | grep -q .; then
git add index.md consolidated_prompts.json README.md
git add index_metadata.json consolidated_prompts.metadata.json
git commit -m "Auto-update: $(date +%Y-%m-%d) - Library indices and README updated"
git push
echo "Changes committed and pushed successfully!"
else
echo "No changes detected, nothing to commit."
fi