Skip to content

Commit ba12a06

Browse files
authored
Merge pull request #747 from tier4/sync/tier4/main
chore: sync beta/v0.41 from tier4/main
2 parents f06d9a8 + 0f0596d commit ba12a06

13 files changed

+359
-129
lines changed

.github/sync-files.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- source: .github/ISSUE_TEMPLATE/task.yaml
1111
- source: .github/pull_request_template.md
1212
- source: .github/dependabot.yaml
13+
- source: .github/workflows/backport.yaml
1314
- source: .github/stale.yml
1415
- source: .github/workflows/comment-on-pr.yaml
1516
- source: .github/workflows/pre-commit.yaml

.github/update-sync-param-files.py

-80
This file was deleted.

.github/workflows/backport.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: backport
2+
on:
3+
pull_request_target:
4+
types:
5+
- closed
6+
- labeled
7+
8+
jobs:
9+
backport:
10+
runs-on: ubuntu-latest
11+
# Only react to merged PRs for security reasons.
12+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
13+
if: >
14+
github.event.pull_request.merged
15+
&& (
16+
github.event.action == 'closed'
17+
|| (
18+
github.event.action == 'labeled'
19+
&& contains(github.event.label.name, 'backport')
20+
)
21+
)
22+
steps:
23+
- name: Generate token
24+
id: generate-token
25+
uses: tibdex/github-app-token@v2
26+
with:
27+
app_id: ${{ secrets.APP_ID }}
28+
private_key: ${{ secrets.PRIVATE_KEY }}
29+
30+
- uses: tibdex/backport@v2
31+
with:
32+
github_token: ${{ steps.generate-token.outputs.token }}
33+
title_template: "<%= title %> (backport #<%= number %>)"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: beta-to-tier4-main-sync
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
source_branch:
7+
description: Source branch
8+
required: true
9+
type: string
10+
11+
jobs:
12+
sync-beta-branch:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Generate token
16+
id: generate-token
17+
uses: tibdex/github-app-token@v1
18+
with:
19+
app_id: ${{ secrets.APP_ID }}
20+
private_key: ${{ secrets.PRIVATE_KEY }}
21+
22+
- name: Run sync-branches
23+
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
24+
with:
25+
token: ${{ steps.generate-token.outputs.token }}
26+
base-branch: tier4/main
27+
sync-pr-branch: beta-to-tier4-main-sync
28+
sync-target-repository: https://github.com/tier4/autoware_launch.git
29+
sync-target-branch: ${{ inputs.source_branch }}
30+
pr-title: "chore: sync beta branch ${{ inputs.source_branch }} with tier4/main"
31+
pr-labels: |
32+
bot
33+
sync-beta-branch
34+
auto-merge-method: merge

.github/workflows/build-and-test.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ jobs:
3333
- name: Show disk space before the tasks
3434
run: df -h
3535

36+
- name: Free disk space (Ubuntu)
37+
uses: jlumbroso/free-disk-space@v1.3.1
38+
with:
39+
tool-cache: false
40+
dotnet: false
41+
swap-storage: false
42+
large-packages: false
43+
3644
- name: Remove exec_depend
3745
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
3846

.github/workflows/check-build-depends.yaml

-41
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: dispatch-release-note
2+
on:
3+
push:
4+
branches:
5+
- beta/v*
6+
- tier4/main
7+
tags:
8+
- v*
9+
workflow_dispatch:
10+
inputs:
11+
beta-branch-or-tag-name:
12+
description: The name of the beta branch or tag to write release note
13+
type: string
14+
required: true
15+
jobs:
16+
dispatch-release-note:
17+
runs-on: ubuntu-latest
18+
name: release-repository-dispatch
19+
steps:
20+
- name: Set ref name
21+
id: set-ref-name
22+
run: |
23+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
24+
REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}"
25+
else
26+
REF_NAME="${{ github.ref_name }}"
27+
fi
28+
echo ::set-output name=ref-name::"${{ github.repository }}/'$REF_NAME'"
29+
- name: Generate token
30+
id: generate-token
31+
uses: tibdex/github-app-token@v1
32+
with:
33+
app_id: ${{ secrets.APP_ID }}
34+
private_key: ${{ secrets.PRIVATE_KEY }}
35+
36+
- name: Repository dispatch for release note
37+
run: |
38+
curl \
39+
-X POST \
40+
-H "Accept: application/vnd.github+json" \
41+
-H "Authorization: token ${{ steps.generate-token.outputs.token }}" \
42+
-H "X-GitHub-Api-Version: 2022-11-28" \
43+
"https://api.github.com/repos/tier4/update-release-notes/dispatches" \
44+
-d '{"event_type":"${{ steps.set-ref-name.outputs.ref-name }}"}'
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: sync-awf-latest
2+
3+
on:
4+
schedule:
5+
- cron: 50 */1 * * * # every 1 hour (**:50)
6+
workflow_dispatch:
7+
8+
jobs:
9+
sync-awf-latest:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Generate token
13+
id: generate-token
14+
uses: tibdex/github-app-token@v1
15+
with:
16+
app_id: ${{ secrets.APP_ID }}
17+
private_key: ${{ secrets.PRIVATE_KEY }}
18+
19+
- name: Run sync-branches
20+
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
21+
with:
22+
token: ${{ steps.generate-token.outputs.token }}
23+
base-branch: awf-latest
24+
sync-pr-branch: sync-awf-latest
25+
sync-target-repository: https://github.com/autowarefoundation/autoware_launch.git
26+
sync-target-branch: main
27+
pr-title: "chore: sync awf-latest"
28+
pr-labels: |
29+
bot
30+
auto-merge-method: merge
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: sync-awf-upstream
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target_branch:
7+
description: Target branch
8+
required: true
9+
type: string
10+
11+
jobs:
12+
sync-awf-upstream:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Generate token
16+
id: generate-token
17+
uses: tibdex/github-app-token@v1
18+
with:
19+
app_id: ${{ secrets.APP_ID }}
20+
private_key: ${{ secrets.PRIVATE_KEY }}
21+
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
26+
- run: npm install @holiday-jp/holiday_jp
27+
28+
- uses: actions/github-script@v6
29+
id: is-holiday
30+
with:
31+
script: |
32+
const holiday_jp = require(`${process.env.GITHUB_WORKSPACE}/node_modules/@holiday-jp/holiday_jp`)
33+
core.setOutput('holiday', holiday_jp.isHoliday(new Date()));
34+
35+
- name: Print warning for invalid branch name
36+
if: ${{ inputs.target_branch == 'tier4/main' }}
37+
run: |
38+
echo This action cannot be performed on 'tier4/main' branch
39+
40+
- name: Run sync-branches
41+
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
42+
if: ${{ inputs.target_branch != 'tier4/main' }}
43+
with:
44+
token: ${{ steps.generate-token.outputs.token }}
45+
base-branch: ${{ inputs.target_branch }}
46+
sync-pr-branch: sync-awf-upstream
47+
sync-target-repository: https://github.com/tier4/autoware_launch.git
48+
sync-target-branch: awf-latest
49+
pr-title: "chore: sync tier4/autoware_launch:awf-latest"
50+
pr-labels: |
51+
bot
52+
sync-awf-upstream
53+
auto-merge-method: merge
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow is intended for the use in the repositories created by forking tier4/autoware_launch.
2+
name: sync-beta-upstream
3+
4+
on:
5+
schedule:
6+
- cron: 0 20 * * *
7+
workflow_dispatch:
8+
9+
jobs:
10+
sync-tier4-upstream:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Generate token
14+
id: generate-token
15+
uses: tibdex/github-app-token@v1
16+
with:
17+
app_id: ${{ secrets.APP_ID }}
18+
private_key: ${{ secrets.PRIVATE_KEY }}
19+
20+
- name: Run sync-branches
21+
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
22+
with:
23+
token: ${{ steps.generate-token.outputs.token }}
24+
base-branch: beta/<version>
25+
sync-pr-branch: sync-beta-upstream
26+
sync-target-repository: https://github.com/tier4/autoware_launch.git
27+
sync-target-branch: beta/<version>
28+
pr-title: "chore: sync beta upstream"
29+
pr-labels: |
30+
bot
31+
sync-tier4-upstream
32+
auto-merge-method: merge

0 commit comments

Comments
 (0)