-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
54 lines (54 loc) · 1.91 KB
/
Copy pathaction.yaml
File metadata and controls
54 lines (54 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: "Sync GitLab Project"
description: "Syncs remote GitLab project with the repository add as a submodule"
inputs:
action:
description: 'Action to perform: `sync-branch | merge-mr`'
required: true
gitlab_token:
description: 'GitLab Personal Access Token'
required: true
gitlab_host:
description: 'GitLab host. Example: `https://gitlab.com`'
required: true
gitlab_project_id:
description: 'GitLab Project ID. Example: `my-org/my-team/my-project`'
required: true
gitlab_target_branch:
description: 'Target branch name in GitLab to merge the MR. Used to create MR in `sync-branch` action, and to merge MR in `merge-mr` action'
required: true
submodule_name:
description: 'Name of the submodule to sync with GitLab'
required: true
branch:
description: 'GitHub branch name to sync with GitLab'
required: true
sha:
description: 'SHA commit of the branch to be used in the submodule update'
required: true
gitlab_merge_when_pipeline_succeeds:
description: 'Merge MR when pipeline succeeds. Default: `false`'
required: false
default: 'false'
github_pr_url:
description: 'GitHub PR URL, used in GitLab MR description. Example: "$\{{ github.server_url }}/$\{{ github.repository }}/pull/$\{{ github.event.pull_request.number }}" (replace `\{{` with `{{`)'
required: false
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.action }}
- --gitlab-project-id
- ${{ inputs.gitlab_project_id }}
- --gitlab-target-branch
- ${{ inputs.gitlab_target_branch }}
- --submodule-name
- ${{ inputs.submodule_name }}
- --branch
- ${{ inputs.branch }}
- --sha
- ${{ inputs.sha }}
env:
GITLAB_HOST: ${{ inputs.gitlab_host }}
GITLAB_TOKEN: ${{ inputs.gitlab_token }}
GITLAB_MERGE_WHEN_PIPELINE_SUCCEEDS: ${{ inputs.gitlab_merge_when_pipeline_succeeds }}
GITHUB_PR_URL: ${{ inputs.github_pr_url }}