forked from autowarefoundation/autoware_launch
-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (46 loc) · 1.62 KB
/
sync-awf-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
42
43
44
45
46
47
48
49
50
51
52
53
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/tier4/autoware_launch.git
sync-target-branch: awf-latest
pr-title: "chore: sync tier4/autoware_launch:awf-latest"
pr-labels: |
bot
sync-awf-upstream
auto-merge-method: merge