Actualizar actividad GitHub #35
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: Actualizar actividad GitHub | |
| on: | |
| schedule: | |
| - cron: '17 6 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: github-activity-update | |
| cancel-in-progress: false | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 20 | |
| - name: Refresh verified contribution calendar | |
| env: | |
| GH_ACTIVITY_TOKEN: ${{ secrets.GH_ACTIVITY_TOKEN }} | |
| GITHUB_ACTIVITY_USER: IAZARA | |
| GITHUB_ACTIVITY_MIN_TOTAL: 750 | |
| run: | | |
| if [ -z "$GH_ACTIVITY_TOKEN" ]; then | |
| echo "::warning::GH_ACTIVITY_TOKEN is not configured. The last verified snapshot remains unchanged." | |
| exit 0 | |
| fi | |
| node scripts/update-github-activity.mjs | |
| - name: Commit updated snapshot | |
| run: | | |
| if git diff --quiet -- assets/data/github-activity.json; then | |
| echo "GitHub activity is already current." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add assets/data/github-activity.json | |
| git commit -m "chore: refresh GitHub activity [skip ci]" | |
| git push |