Skip to content

Commit 0bdb143

Browse files
committed
update readme
1 parent c458d3e commit 0bdb143

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# GitLab Sync - GitHub Action
22

3-
**GitLab Sync** is a easy to use github action for syncing code to gitlab.
3+
**GitLab Sync** is a GitHub Action designed for straightforward synchronization of code from a GitHub repository to a GitLab repository.
44

5-
## My Motivation
5+
## Motivation
66

7-
I was sick of all the not working github actions so I just hacked one myself lol
7+
This GitHub Action was developed to provide a reliable and easy-to-use solution for syncing repositories between GitHub and GitLab, addressing common challenges found in existing solutions.
88

99
## How to Use
1010

11-
To use this github action follow these steps below!
11+
Follow these steps to integrate this GitHub Action into your workflow:
1212

13-
### Step 1: Set Up Secrets in GitHub
13+
### Step 1: Configure GitHub Secrets
1414

15+
Before using the action, you need to add the following secrets to your GitHub repository's settings:
1516

16-
- `GITLAB_URL`: The URL of your GitLab repository (e.g., `https://gitlab.com/yourusername/yourrepo.git`).
17+
- `GITLAB_URL`: The HTTPS URL of your GitLab repository (e.g., `https://gitlab.com/yourusername/yourrepo.git`).
1718
- `USERNAME`: Your GitLab username.
18-
- `GITLAB_PAT`: Your GitLab Personal Access Token.
19+
- `GITLAB_PAT`: Your GitLab Personal Access Token with appropriate permissions to push to the repository.
1920

2021
### Step 2: Add the Workflow to Your GitHub Repository
2122

22-
Create a `.github/workflows/action.yml` file in your repository and add the following workflow configuration:
23+
Create a workflow file (e.g., `.github/workflows/sync-to-gitlab.yml`) in your GitHub repository with the following configuration:
2324

2425
```yaml
2526
name: Sync Repo to GitLab
@@ -31,31 +32,34 @@ jobs:
3132
sync:
3233
runs-on: ubuntu-latest
3334
steps:
34-
- uses: keninkujovic/gitlab-sync@2.0.0
35+
- name: Sync to GitLab
36+
uses: keninkujovic/gitlab-sync@2.0.0
3537
with:
3638
gitlab_url: ${{ secrets.GITLAB_URL }}
3739
username: ${{ secrets.USERNAME }}
3840
gitlab_pat: ${{ secrets.GITLAB_PAT }}
3941
```
4042
43+
**Note:** It's recommended to specify which branches trigger the sync (e.g., `main`, `master`) and to include `actions/checkout@v3` (or a newer version) to ensure the action has access to your repository's content. Using `fetch-depth: 0` ensures all history is fetched, which is often necessary for a clean sync.
44+
4145
### Step 3: Push Changes to GitHub
4246

43-
Now you just need to push to GitHub and all the changes will be synced to Gitlab!
47+
Once the workflow is set up, any push to the configured branches in your GitHub repository will automatically trigger the synchronization process to your GitLab repository.
4448

4549
## Inputs
4650

47-
Here are the required inputs
51+
The following inputs are required for this action:
4852

49-
- `gitlab_url`: The URL of your GitLab repository.
50-
- `username`: Your GitLab username.
51-
- `gitlab_pat`: Your Personal Access Token for GitLab.
53+
- `gitlab_url`: (Required) The HTTPS URL of your GitLab repository.
54+
- `username`: (Required) Your GitLab username.
55+
- `gitlab_pat`: (Required) Your GitLab Personal Access Token. Ensure this token has sufficient permissions to write to the target GitLab repository.
5256

5357
## Feedback and Contributions
5458

55-
Your feedback and contributions are welcome! Feel free to open an issue or submit a pull request in my repository.
59+
Feedback and contributions are highly valued. Please feel free to open an issue for bug reports or feature requests, or submit a pull request with improvements.
5660

57-
Also if you like the actions star it!
61+
If you find this action useful, consider starring the repository!
5862

5963
## Disclaimer
6064

61-
This was built in need and not tested properly.
65+
This action was developed to fulfill a specific need. While it has been tested, users should verify its functionality in their own environments. Please use it at your own discretion.

0 commit comments

Comments
 (0)