File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ The action supports the following input parameters:
6666| `username` | Your GitLab username. | Yes | N/A |
6767| `gitlab_pat` | Your GitLab Personal Access Token. Must have permissions to write (`write_repository` scope) to the target repository. | Yes | N/A |
6868| `force_push` | Whether to force push to GitLab. If `true`, overwrites the destination branch. Use with caution. | No | `false` |
69+ | `git_lfs` | Whether to sync Git LFS objects to GitLab. Requires LFS to be enabled on the target GitLab repository. | No | `false` |
6970
7071# # Feedback and Contributions
7172
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ inputs:
1717 description : ' Whether to force push to GitLab. Defaults to false.'
1818 required : false
1919 default : ' false'
20+ git_lfs :
21+ description : ' Whether to sync Git LFS objects to GitLab. Defaults to false.'
22+ required : false
23+ default : ' false'
2024runs :
2125 using : ' composite'
2226 steps :
2529 with :
2630 fetch-depth : 0
2731 persist-credentials : false
32+ lfs : ${{ inputs.git_lfs }}
2833 - name : Validate inputs
2934 run : |
3035 errors=()
6267 gitlab_repo_url_with_credentials="https://${{ inputs.username }}:${{ inputs.gitlab_pat }}@${gitlab_repo_url}"
6368 git remote add gitlab "$gitlab_repo_url_with_credentials"
6469 branch_name=$(echo $GITHUB_REF | sed 's/refs\/heads\///')
70+ if [[ "${{ inputs.git_lfs }}" == "true" ]]; then
71+ git lfs push --all gitlab
72+ fi
6573 push_command="git push gitlab $branch_name"
6674 if [[ "${{ inputs.force_push }}" == "true" ]]; then
6775 push_command="$push_command --force"
You can’t perform that action at this time.
0 commit comments