Daily Summarize #220
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: Daily Summarize | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 1 * * *' | |
| jobs: | |
| summarize: | |
| environment: daily | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| activate-environment: true | |
| - name: Install dependencies | |
| run: | | |
| uv pip install . | |
| - name: Run Summarize | |
| run: | | |
| uv run gitmetrics summarize \ | |
| --input-folder ${{ secrets.OUTPUT_FOLDER }} | |
| env: | |
| PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: sdv-dev/sdv-dev.github.io | |
| path: sdv-dev.github.io | |
| ref: 'gatsby-home' | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Write to sdv-dev.github.io repo | |
| run: | | |
| ls | |
| find ./ -name '*.xlsx' -exec cp -prv '{}' 'sdv-dev.github.io/assets/' ';' | |
| cd sdv-dev.github.io | |
| git config --local user.name "github-actions[bot]" | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add --force assets/GitHub_Summary.xlsx | |
| git commit -m "Upload GitHub Summary - $(date '+%Y-%m-%d %H:%M:%S')" | |
| git remote set-url origin https://sdv-team:${{ secrets.GH_TOKEN }}@github.com/sdv-dev/sdv-dev.github.io | |
| git push origin gatsby-home | |
| alert: | |
| needs: [summarize] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: failure() | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| activate-environment: true | |
| - name: Install dependencies | |
| run: | | |
| uv pip install .[dev] |