Skip to content

Ejecutar Script de Playwright Diariamente con Bun #3390

Ejecutar Script de Playwright Diariamente con Bun

Ejecutar Script de Playwright Diariamente con Bun #3390

Workflow file for this run

name: Ejecutar Script de Playwright Diariamente con Bun
# Controla cuándo se ejecutará el workflow.
on:
schedule:
# Ejecuta el trabajo cada 30 minutos
- cron: '*/30 * * * *'
# Permite ejecutar manualmente este workflow desde GitHub Actions.
workflow_dispatch:
jobs:
run-playwright:
runs-on: ubuntu-latest
steps:
# 1. Checkout del repositorio.
- name: Checkout del repositorio
uses: actions/checkout@v3
# 2. Instalar Bun.
- name: Instalar Bun
run: |
curl -fsSL https://bun.sh/install | bash
echo "/home/runner/.bun/bin" >> $GITHUB_PATH
# 3. Instalar dependencias con Bun.
- name: Instalar dependencias con Bun
run: bun install
# 4. Instalar navegadores de Playwright.
- name: Instalar navegadores de Playwright
run: bunx playwright install
# 5. Ejecutar el script usando Bun.
- name: Ejecutar script de Playwright
run: bun run index.js
# 6. Commit y Push de los cambios
- name: Commit y Push de los cambios
uses: actions-js/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: "Auto commit test"
files: test.txt
target_branch: main
force: true