Skip to content

Sync with Upstream

Sync with Upstream #11

name: Sync with Upstream
on:
schedule:
- cron: '0 0 * * *' # Ejecuta el workflow diariamente a medianoche UTC
workflow_dispatch: # Permite ejecutarlo manualmente desde la interfaz de GitHub
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Configurar Git
run: |
git config --global user.name "Melkoroth"
git config --global user.email "fotov60@gmail.com"
- name: Clonar el repositorio
uses: actions/checkout@v3
with:
persist-credentials: false # No usar credenciales del token de GitHub
fetch-depth: 0 # Clona todo el historial
- name: Agregar Upstream
run: |
git remote add upstream https://github.com/AI-ANK/RAGArch.git
git fetch upstream
git merge upstream/main --allow-unrelated-histories --strategy recursive --strategy-option ours # Prioriza tus cambios
- name: Subir cambios
env:
SYNC_TOKEN: ${{ secrets.SyncWorkflowToken }}
run: |
git remote set-url origin https://${{ github.actor }}:${SYNC_TOKEN}@github.com/${{ github.repository }}.git
git push origin main