Skip to content

Commit 628e6b2

Browse files
committed
feat(agent): refactorizar scripts bash e implementar Medalcode-Agent CI
1 parent 8f01768 commit 628e6b2

5 files changed

Lines changed: 345 additions & 285 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Medalcode Agent Tasks
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 1 * *' # El día 1 de cada mes
6+
workflow_dispatch: # Permite ejecución manual
7+
8+
jobs:
9+
agent-tasks:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Update Last Updated Date
16+
run: |
17+
# Extraer fecha en español (ej. Junio 2026)
18+
CURRENT_DATE=$(LC_TIME=es_ES.UTF-8 date '+%B %Y' | awk '{print toupper(substr($0,1,1))substr($0,2)}')
19+
# Reemplazar usando los marcadores HTML
20+
sed -i -E "s/(<!-- DATE_START -->).*?(<!-- DATE_END -->)/\1${CURRENT_DATE}\2/g" README.md
21+
22+
- name: Audit Assets
23+
run: |
24+
chmod +x generate-assets.sh
25+
./generate-assets.sh check || echo "Asset audit completed"
26+
27+
- name: Commit changes
28+
run: |
29+
git config --global user.name "Medalcode-Agent"
30+
git config --global user.email "jonatthan.medalla@gmail.com"
31+
git add README.md
32+
if ! git diff --cached --quiet; then
33+
git commit -m "docs(agent): actualizar fecha del perfil a ${CURRENT_DATE}"
34+
git push
35+
else
36+
echo "No changes to commit."
37+
fi

‎.github/workflows/ci.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
exit 1
2929
fi
3030
31-
- name: Validate README links
32-
run: |
33-
if grep -qP '\[.*\]\(https?://' README.md; then
34-
echo "README contains external links"
35-
fi
31+
- name: ShellCheck
32+
uses: ludeeus/action-shellcheck@master
33+
34+
- name: Validate Links
35+
uses: lycheeverse/lychee-action@v1.10.0
36+
with:
37+
args: --verbose --no-progress './README.md'

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,5 @@ Una colección de herramientas profesionales para administradores de redes y sop
171171
<br />
172172

173173
<div align="center">
174-
<sub>Última actualización: Mayo 2026 | Construido con ❤️ y automatizado con Medalcode-Agent</sub>
174+
<sub>Última actualización: <!-- DATE_START -->Junio 2026<!-- DATE_END --> | Construido con ❤️ y automatizado con Medalcode-Agent</sub>
175175
</div>

0 commit comments

Comments
 (0)