@@ -55,8 +55,7 @@ Automated synchronization system that mirrors GitHub repositories to GitLab in r
55552 . Add two secrets:
5656``` bash
5757GITLAB_TOKEN: [your GitLab personal access token]
58-
59- GITLAB_USERNAME: [your GitLab username (optional)]
58+ GITLAB_USERNAME: [your GitLab username ]
6059```
6160
6261
@@ -230,45 +229,29 @@ jobs:
230229#### Step 4: Test the Synchronization
231230
232231` ` ` bash
233-
234232# Make a test commit
235-
236233echo "Test sync" >> test-file.txt
237-
238234git add test-file.txt
239-
240235git commit -m "test : testing GitHub to GitLab sync"
241-
242236git push origin main
243-
244-
245-
246237\# Check the results:
247-
248238\# 1. Visit GitHub Actions tab in your repository
249-
250239\# 2. Watch the workflow execute
251-
252240\# 3. Visit your GitLab repository to see the mirrored commit
253-
254241```
255242
256243
257244
258245## 📁 Project Structure
259246
260247```
261-
262248DevOps-Github-Gitlab-CI-CD-Automation-Yml/
263249├── .github/
264250│ └── workflows/
265251│ └── sync-gitlab.yml # Main synchronization workflow
266- ├── docs/ # Documentation (optional)
267- ├── examples/ # Example configurations
268252├── README.md # This documentation
269253├── LICENSE # MIT License
270254└── .gitignore # Git ignore rules
271-
272255```
273256
274257
@@ -295,39 +278,20 @@ env:
295278### Advanced Workflow Features
296279
297280` ` ` yaml
298-
299281# Sync all branches
300-
301282on :
302-
303283 push :
304-
305284 branches : [main, develop, feature/*]
306-
307-
308-
309285# Include tags
310-
311286steps :
312-
313287 - run : git push --tags gitlab
314-
315-
316-
317288\# Manual trigger
318-
319289on :
320-
321290 workflow\_dispatch :
322-
323291 inputs :
324-
325292 branch :
326-
327293 description : ' Branch to sync'
328-
329294 required : true
330-
331295` ` `
332296
333297
355319Add this to your workflow to see detailed logs :
356320
357321` ` ` yaml
358-
359322env:
360-
361323 ACTIONS_STEP_DEBUG: true
362-
363324 ACTIONS_RUNNER_DEBUG: true
364325` ` `
365326
@@ -423,21 +384,13 @@ env:
423384# ## Continuous Integration
424385
425386` ` ` mermaid
426-
427387graph LR
428-
429388 A --> [Local Commit] --> B[GitHub]
430-
431389 B --> C[GitHub Actions]
432-
433390 C --> D[Auto Sync]
434-
435391 D --> E[GitLab]
436-
437392 E --> F[GitLab CI/CD]
438-
439393 F --> G[Deployment]
440-
441394` ` `
442395
443396
@@ -515,15 +468,8 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
515468
516469
517470```
518-
519471MIT License
520-
521-
522-
523472Copyright (c) 2024 Ayoub Aguezar
524-
525-
526-
527473Permission is hereby granted, free of charge, to any person obtaining a copy
528474
529475of this software and associated documentation files (the "Software"), to deal
@@ -535,13 +481,8 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
535481copies of the Software, and to permit persons to whom the Software is
536482
537483furnished to do so, subject to the following conditions:
538-
539-
540-
541484The above copyright notice and this permission notice shall be included in all
542-
543485copies or substantial portions of the Software.
544-
545486```
546487
547488
0 commit comments