Skip to content

sync-awf-upstream

sync-awf-upstream #146

name: sync-awf-upstream
on:
workflow_dispatch:
inputs:
target_branch:
description: Target branch
required: true
type: string
jobs:
sync-awf-upstream:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install @holiday-jp/holiday_jp
- uses: actions/github-script@v6
id: is-holiday
with:
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
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
if: ${{ inputs.target_branch != 'tier4/main' }}
with:
token: ${{ steps.generate-token.outputs.token }}
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
pr-title: "chore: sync awf/autoware_launch"
pr-labels: |
bot
sync-awf-upstream
auto-merge-method: merge