Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sdk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OCF
sdk
Commits
e25b521c
Unverified
Commit
e25b521c
authored
5 months ago
by
Jorge Echevarria Uribarri
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Create gitlab.yml
parent
0cc3b7c1
No related branches found
No related tags found
2 merge requests
!3
Logging feature developed
,
!2
Logging feature
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/gitlab.yml
+30
-0
30 additions, 0 deletions
.github/workflows/gitlab.yml
with
30 additions
and
0 deletions
.github/workflows/gitlab.yml
0 → 100644
+
30
−
0
View file @
e25b521c
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment