Skip to content

Commit 360ef0f

Browse files
authored
chore: update sync upstream script (#236)
Signed-off-by: tomoya.kimura <[email protected]>
1 parent 6d4af73 commit 360ef0f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/sync-awf-upstream.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: sync-awf-upstream
22

33
on:
4-
schedule:
5-
- cron: 0 1 * * 1-5
64
workflow_dispatch:
5+
inputs:
6+
target_branch:
7+
description: Target branch
8+
required: true
9+
type: string
710

811
jobs:
912
sync-awf-upstream:
@@ -29,12 +32,17 @@ jobs:
2932
const holiday_jp = require(`${process.env.GITHUB_WORKSPACE}/node_modules/@holiday-jp/holiday_jp`)
3033
core.setOutput('holiday', holiday_jp.isHoliday(new Date()));
3134
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+
3240
- name: Run sync-branches
3341
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' }}
3543
with:
3644
token: ${{ steps.generate-token.outputs.token }}
37-
base-branch: tier4/main
45+
base-branch: ${{ inputs.target_branch }}
3846
sync-pr-branch: sync-awf-upstream
3947
sync-target-repository: https://github.com/autowarefoundation/autoware_launch.git
4048
sync-target-branch: main

0 commit comments

Comments
 (0)