Skip to content

sync-awf-upstream

sync-awf-upstream #41

name: sync-awf-upstream
on:
schedule:
- cron: 0 1 * * 1-5
workflow_dispatch:
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: Run sync-branches
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
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