File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : sync-awf-upstream
2
2
3
3
on :
4
- schedule :
5
- - cron : 0 1 * * 1-5
6
4
workflow_dispatch :
5
+ inputs :
6
+ target_branch :
7
+ description : Target branch
8
+ required : true
9
+ type : string
7
10
8
11
jobs :
9
12
sync-awf-upstream :
@@ -29,12 +32,17 @@ jobs:
29
32
const holiday_jp = require(`${process.env.GITHUB_WORKSPACE}/node_modules/@holiday-jp/holiday_jp`)
30
33
core.setOutput('holiday', holiday_jp.isHoliday(new Date()));
31
34
35
+ - name : Print warning for invalid branch name
36
+ if : ${{ inputs.target_branch == 'tier4/main' }}
37
+ run : |
38
+ echo This action cannot be performed on 'tier4/main' branch
39
+
32
40
- name : Run sync-branches
33
41
uses : autowarefoundation/autoware-github-actions/sync-branches@v1
34
- if : ${{ steps.is-holiday.outputs.holiday != 'true' || github.event_name == 'workflow_dispatch ' }}
42
+ if : ${{ inputs.target_branch != 'tier4/main ' }}
35
43
with :
36
44
token : ${{ steps.generate-token.outputs.token }}
37
- base-branch : tier4/main
45
+ base-branch : ${{ inputs.target_branch }}
38
46
sync-pr-branch : sync-awf-upstream
39
47
sync-target-repository : https://github.com/autowarefoundation/autoware_launch.git
40
48
sync-target-branch : main
You can’t perform that action at this time.
0 commit comments