🤖 Copilot Daily Aesthetic Evolution #162
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🤖 Copilot Daily Aesthetic Evolution | |
| on: | |
| schedule: | |
| # Runs daily at 12:00 UTC | |
| - cron: '0 12 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| force_evolution: | |
| description: 'Force a new aesthetic evolution even if one ran today' | |
| required: false | |
| default: 'false' | |
| type: boolean | |
| permissions: | |
| contents: write | |
| models: read | |
| jobs: | |
| evolve-aesthetics: | |
| name: Evolve UI Aesthetics with Copilot | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install script dependencies | |
| run: npm install --prefix .github/scripts | |
| - name: Run Copilot theme evolution | |
| id: evolve | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| run: node .github/scripts/evolve-theme.js | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git diff --quiet src/theme/evolution.json && \ | |
| echo "changed=false" >> $GITHUB_OUTPUT || \ | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push evolved theme | |
| if: steps.changes.outputs.changed == 'true' | |
| run: | | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| EVOLUTION_NOTE=$(node -e " | |
| const t = require('./src/theme/evolution.json'); | |
| console.log(t._evolutionNote || 'Daily aesthetic evolution'); | |
| ") | |
| git add src/theme/evolution.json | |
| git commit -m "🎨 Copilot aesthetic evolution: ${EVOLUTION_NOTE:0:80} | |
| Evolved by: GitHub Copilot | |
| Triggered by: Scheduled daily run | |
| Date: $(date -u '+%Y-%m-%d %H:%M UTC') | |
| [skip ci]" | |
| git push | |
| - name: No changes detected | |
| if: steps.changes.outputs.changed == 'false' | |
| run: echo "Theme already up to date — no evolution needed." |