diff --git a/.github/workflows/sync-awf-upstream.yaml b/.github/workflows/sync-awf-upstream.yaml index f0e6272286..91012439fb 100644 --- a/.github/workflows/sync-awf-upstream.yaml +++ b/.github/workflows/sync-awf-upstream.yaml @@ -1,9 +1,12 @@ name: sync-awf-upstream on: - schedule: - - cron: 0 1 * * 1-5 workflow_dispatch: + inputs: + target_branch: + description: Target branch + required: true + type: string jobs: sync-awf-upstream: @@ -29,12 +32,17 @@ jobs: 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 uses: autowarefoundation/autoware-github-actions/sync-branches@v1 - if: ${{ steps.is-holiday.outputs.holiday != 'true' || github.event_name == 'workflow_dispatch' }} + if: ${{ inputs.target_branch != 'tier4/main' }} with: token: ${{ steps.generate-token.outputs.token }} - base-branch: tier4/main + base-branch: ${{ inputs.target_branch }} sync-pr-branch: sync-awf-upstream sync-target-repository: https://github.com/autowarefoundation/autoware_launch.git sync-target-branch: main