Skip to content

Sync from GitLab

Sync from GitLab #5

Workflow file for this run

name: Sync from GitLab
on:
workflow_dispatch: # Permite ejecutarlo manualmente
schedule:
- cron: '0 0 * * *' # Ejecuta Diariamente a la medianoche.
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub repository
uses: actions/checkout@v3
- name: Set up Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Sync from GitLab
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
# URL del repositorio de GitLab
GITLAB_REPO_URL=https://oauth2:${GITLAB_TOKEN}@gitlab.com/darkfoe703/simple-api-restful-flask.git
# Clonar el repositorio de GitLab
git clone --mirror $GITLAB_REPO_URL repo
cd repo
# Sincronizar con GitHub
git push --mirror