-
Notifications
You must be signed in to change notification settings - Fork 0
/
push.bara.sky.tmpl
32 lines (32 loc) · 1.02 KB
/
push.bara.sky.tmpl
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
SOT_REPO = "{sotRepo}"
SOT_BRANCH = "{sotBranch}"
DESTINATION_REPO = "{destinationRepo}"
DESTINATION_BRANCH = "{destinationBranch}"
COMMITTER = "{committer}"
MODE = "{mode}"
LOCAL_SOT = "{localSot}"
PUSH_FILES = {push_files}
DEST_FILES = {destination_files}
PUSH_TRANSFORMATIONS = {push_transformations}
PR_TRANSFORMATIONS = {pr_transformations}
# Push workflow
core.workflow(
name = "push",
origin = git.origin(
# url = LOCAL_SOT if LOCAL_SOT else SOT_REPO,
url = SOT_REPO,
ref = SOT_BRANCH,
),
destination = git.github_destination(
url = DESTINATION_REPO,
push = DESTINATION_BRANCH,
),
origin_files = PUSH_FILES,
destination_files = DEST_FILES,
authoring = authoring.pass_thru(default = COMMITTER),
mode = MODE,
transformations = [
# metadata.restore_author("ORIGINAL_AUTHOR", search_all_changes = True),
# metadata.expose_label("COPYBARA_INTEGRATE_REVIEW"),
] + PUSH_TRANSFORMATIONS if PUSH_TRANSFORMATIONS else core.reverse(PR_TRANSFORMATIONS),
)