Skip to content
Snippets Groups Projects
Unverified Commit e25b521c authored by Jorge Echevarria Uribarri's avatar Jorge Echevarria Uribarri Committed by GitHub
Browse files

Create gitlab.yml

parent 0cc3b7c1
No related branches found
No related tags found
2 merge requests!3Logging feature developed,!2Logging feature
name: Sync GitHub to GitLab
on:
push:
branches:
- develop # Se activa cuando hay cambios en la rama develop
jobs:
sync:
runs-on: ubuntu-latest
steps:
# 1. Checkout del código desde GitHub
- name: Checkout GitHub repository
uses: actions/checkout@v4
# 2. Configurar Git para empujar a GitLab
- name: Push to GitLab main
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
# Configurar Git
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Agregar el repositorio remoto de GitLab
git remote add gitlab https://oauth2:${GITLAB_TOKEN}@labs.etsi.org/rep/ocf/sdk.git
# Forzar el push de la rama develop a main en GitLab
git push -u gitlab develop:main --force
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment