Sync from GitLab #8
This file contains 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: 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 |