Skip to content

Commit

Permalink
chore: update sync upstream script (autowarefoundation#792)
Browse files Browse the repository at this point in the history
* chore: update sync upstream script

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
tkimura4 and pre-commit-ci[bot] authored Sep 12, 2023
1 parent be17f4b commit 81a3c6d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/sync-upstream.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: sync-upstream

on:
schedule:
- cron: 0 1 * * 1-5
workflow_dispatch:
inputs:
target_branch:
description: Target branch
required: true
type: string

jobs:
sync-upstream:
Expand All @@ -28,12 +31,17 @@ jobs:
script: |
const holiday_jp = require(`${process.env.GITHUB_WORKSPACE}/node_modules/@holiday-jp/holiday_jp`)
core.setOutput('holiday', holiday_jp.isHoliday(new Date()));
- name: Print warning for invalid branch name
if: ${{ inputs.target_branch == 'tier4/main' }}
run: |
echo This action cannot be performed on 'tier4/main' branch
- name: Run sync-branches
if: ${{ inputs.target_branch != 'tier4/main' }}
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
if: ${{ steps.is-holiday.outputs.holiday != 'true' || github.event_name == 'workflow_dispatch' }}
with:
token: ${{ steps.generate-token.outputs.token }}
base-branch: tier4/main
base-branch: ${{ inputs.target_branch }}
sync-pr-branch: sync-upstream
sync-target-repository: https://github.com/autowarefoundation/autoware.universe.git
sync-target-branch: main
Expand Down

0 comments on commit 81a3c6d

Please sign in to comment.