forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 34
41 lines (36 loc) · 1.29 KB
/
sync-upstream.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: sync-upstream
on:
schedule:
- cron: 0 1 * * 1-5
workflow_dispatch:
jobs:
sync-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-upstream
sync-target-repository: https://github.com/autowarefoundation/autoware.universe.git
sync-target-branch: main
pr-title: "chore: sync upstream"
auto-merge-method: merge