Skip to content

Commit a270c6c

Browse files
authored
Merge pull request #1780 from tier4/sync/tier4/main
chore: sync beta/v0.41 from tier4/main
2 parents 73988a6 + 0ace6c9 commit a270c6c

9 files changed

+245
-18
lines changed

.github/CODEOWNERS .github/_CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ sensing/autoware_radar_scan_to_pointcloud2/** [email protected] shunsuke.m
193193
sensing/autoware_radar_static_pointcloud_filter/** [email protected] [email protected] [email protected] [email protected]
194194
195195
sensing/autoware_radar_tracks_noise_filter/** [email protected] [email protected] [email protected] [email protected]
196-
sensing/autoware_vehicle_velocity_converter/** [email protected]
197196
sensing/livox/autoware_livox_tag_filter/** [email protected] [email protected]
197+
sensing/autoware_vehicle_velocity_converter/** [email protected]
198198
simulator/autoware_carla_interface/** [email protected] [email protected]
199199
simulator/autoware_dummy_perception_publisher/** [email protected] [email protected]
200200
simulator/autoware_fault_injection/** [email protected] [email protected]
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.universe.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/comment-on-pr.yaml

+18-16
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@
33
# To make changes, update the source repository and follow the guidelines in its README.
44

55
name: comment-on-pr
6+
67
on:
7-
pull_request_target:
8+
pull_request:
9+
types:
10+
- opened
11+
branches:
12+
- beta/v0.[0-9]+.[1-9]+
813

914
jobs:
1015
comment-on-pr:
1116
runs-on: ubuntu-22.04
1217
permissions:
1318
pull-requests: write
1419
steps:
15-
- name: Check out repository
16-
uses: actions/checkout@v4
17-
18-
- name: Initial PR comment
19-
uses: marocchino/sticky-pull-request-comment@v2
20-
with:
21-
message: |
22-
Thank you for contributing to the Autoware project!
23-
24-
🚧 If your pull request is in progress, [switch it to draft mode](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft).
25-
26-
Please ensure:
27-
- You've checked our [contribution guidelines](https://autowarefoundation.github.io/autoware-documentation/main/contributing/).
28-
- Your PR follows our [pull request guidelines](https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/).
29-
- All required CI checks pass before [marking the PR ready for review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review).
20+
- name: Create comments
21+
run: |
22+
cat << EOF > comments
23+
### Merging guidelines for the beta branch
24+
Please use `Squash and merge` as the default.
25+
However, when incorporating multiple changes with cherry-pick, use a `Create a merge commit` to preserve the changes in the history.
26+
EOF
27+
- name: Post comments
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
URL: ${{ github.event.pull_request.html_url }}
31+
run: gh pr comment -F ./comments "${URL}"
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: dispatch-push-event
2+
on:
3+
push:
4+
5+
jobs:
6+
search-dispatch-repo:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
include:
11+
- { version: beta/v0.3.**, dispatch-repo: pilot-auto.x1.eve }
12+
outputs:
13+
dispatch-repo: ${{ steps.search-dispatch-repo.outputs.value }}
14+
steps:
15+
- name: Search dispatch repo
16+
id: search-dispatch-repo
17+
run: |
18+
if [[ ${{ github.ref_name }} =~ ${{ matrix.version }} ]]; then
19+
echo ::set-output name=value::"${{ matrix.dispatch-repo }}"
20+
echo "Detected beta branch: ${{ github.ref_name }}"
21+
echo "Dispatch repository: ${{ matrix.dispatch-repo }}"
22+
fi
23+
24+
dispatch-push-event:
25+
runs-on: ubuntu-latest
26+
needs: search-dispatch-repo
27+
if: ${{ needs.search-dispatch-repo.outputs.dispatch-repo != '' }}
28+
steps:
29+
- name: Generate token
30+
id: generate-token
31+
uses: tibdex/github-app-token@v1
32+
with:
33+
app_id: ${{ secrets.INTERNAL_APP_ID }}
34+
private_key: ${{ secrets.INTERNAL_PRIVATE_KEY }}
35+
36+
# 注意: workflow_dispatchで指定するブランチはmain固定となっているため、dispatch-repoのmainブランチにupdate-beta-branch.yamlが存在することが前提条件。
37+
- name: Dispatch the update-beta-branch workflow
38+
run: |
39+
curl -L \
40+
-X POST \
41+
-H "Accept: application/vnd.github+json" \
42+
-H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \
43+
-H "X-GitHub-Api-Version: 2022-11-28" \
44+
https://api.github.com/repos/tier4/${{ needs.search-dispatch-repo.outputs.dispatch-repo }}/actions/workflows/update-beta-branch.yaml/dispatches \
45+
-d '{"ref":"main"}'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 tag name
21+
id: set-tag-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::"$REF_NAME"
29+
echo ::set-output name=tag-name::"${REF_NAME#beta/}"
30+
31+
- name: Generate token
32+
id: generate-token
33+
uses: tibdex/github-app-token@v1
34+
with:
35+
app_id: ${{ secrets.APP_ID }}
36+
private_key: ${{ secrets.PRIVATE_KEY }}
37+
38+
- name: Repository dispatch for release note
39+
run: |
40+
curl \
41+
-X POST \
42+
-H "Accept: application/vnd.github+json" \
43+
-H "Authorization: token ${{ steps.generate-token.outputs.token }}" \
44+
-H "X-GitHub-Api-Version: 2022-11-28" \
45+
"https://api.github.com/repos/tier4/update-release-notes/dispatches" \
46+
-d '{"event_type":"${{ steps.set-tag-name.outputs.ref-name }}"}'

.github/workflows/slack-send.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: slack-send
2+
on:
3+
workflow_run:
4+
workflows:
5+
- build-and-test
6+
types:
7+
- completed
8+
9+
jobs:
10+
on-failure:
11+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v3
16+
17+
- name: Send to Slack workflow
18+
uses: slackapi/slack-github-action@v1
19+
with:
20+
payload: |
21+
{
22+
"workflow-url": "${{ github.event.workflow_run.html_url }}"
23+
}
24+
env:
25+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WORKFLOW_WEBHOOK_URL }}
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
- uses: actions/checkout@v2
13+
with:
14+
token: ${{ secrets.TOKEN_TO_MODIFY_WOKFLOW }}
15+
fetch-depth: 0
16+
- name: Commit Results
17+
run: |
18+
git config --local user.email "[email protected]"
19+
git config --local user.name "GitHub Action"
20+
21+
git checkout awf-latest
22+
git remote add awf https://github.com/autowarefoundation/autoware.universe
23+
git fetch awf main
24+
git rebase awf/main
25+
26+
git push origin awf-latest --force

.github/workflows/sync-upstream.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: sync-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-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+
- name: Print warning for invalid branch name
35+
if: ${{ inputs.target_branch == 'tier4/main' }}
36+
run: |
37+
echo This action cannot be performed on 'tier4/main' branch
38+
39+
- name: Run sync-branches
40+
if: ${{ inputs.target_branch != 'tier4/main' }}
41+
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
42+
with:
43+
token: ${{ steps.generate-token.outputs.token }}
44+
base-branch: ${{ inputs.target_branch }}
45+
sync-pr-branch: sync-upstream
46+
sync-target-repository: https://github.com/tier4/autoware.universe.git
47+
sync-target-branch: awf-latest
48+
pr-title: "chore: sync tier4/autoware.universe:awf-latest"
49+
auto-merge-method: merge

.pre-commit-config-optional.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ci:
1111

1212
repos:
1313
- repo: https://github.com/tcort/markdown-link-check
14-
rev: v3.12.2
14+
rev: v3.13.6
1515
hooks:
1616
- id: markdown-link-check
1717
args: [--quiet, --config=.markdown-link-check.json]

0 commit comments

Comments
 (0)