feat(portfolio): curar los 8 Proyectos Principales (Featured Portfoli… #10
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: Medalcode Agent Tasks | ||
| on: | ||
| schedule: | ||
| - cron: '0 0 1 * *' # El día 1 de cada mes | ||
| workflow_dispatch: # Permite ejecución manual | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| agent-tasks: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Update Last Updated Date | ||
| run: | | ||
| # Generar fecha en español de forma agnóstica al SO/locale | ||
| CURRENT_DATE=$(python3 -c " | ||
| import datetime | ||
| months = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'] | ||
| now = datetime.datetime.now(datetime.timezone.utc) | ||
| print(f'{months[now.month - 1]} {now.year}') | ||
| ") | ||
| echo "Fecha formateada: $CURRENT_DATE" | ||
| sed -i -E "s/(<!-- DATE_START -->).*?(<!-- DATE_END -->)/\1${CURRENT_DATE}\2/g" README.md | ||
| - name: Audit Assets | ||
| run: | | ||
| chmod +x generate-assets.sh | ||
| ./generate-assets.sh check || echo "Asset audit completed" | ||
| - name: Commit changes | ||
| run: | | ||
| git config --global user.name "Medalcode-Agent" | ||
| git config --global user.email "jonatthan.medalla@gmail.com" | ||
| git add README.md | ||
| if ! git diff --cached --quiet; then | ||
| git commit -m "docs(agent): actualizar fecha del perfil a ${CURRENT_DATE}" | ||
| git push | ||
| else | ||
| echo "No changes to commit." | ||
| fi | ||