Skip to content

Commit 076b17e

Browse files
author
github-actions
committed
Update .github folder from main branch for beta/v0.63
1 parent 058acdf commit 076b17e

10 files changed

+301
-34
lines changed

.github/labeler.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,3 @@
1313
- "**/*.jpg"
1414
- "**/*.png"
1515
- "**/*.svg"
16-
"component:common":
17-
- common/**/*
18-
"component:control":
19-
- control/**/*
20-
"component:evaluator":
21-
- evaluator/**/*
22-
"component:launch":
23-
- launch/**/*
24-
"component:localization":
25-
- localization/**/*
26-
"component:map":
27-
- map/**/*
28-
"component:perception":
29-
- perception/**/*
30-
"component:planning":
31-
- planning/**/*
32-
"component:sensing":
33-
- sensing/**/*
34-
"component:simulation":
35-
- simulator/**/*
36-
"component:system":
37-
- system/**/*
38-
"component:tools":
39-
- tools/**/*
40-
"component:vehicle":
41-
- vehicle/**/*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
build-and-test-differential-arm64:
2222
needs: make-sure-label-is-present
2323
if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }}
24-
runs-on: ubuntu-22.04-arm
24+
runs-on: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
2525
container: ${{ matrix.container }}${{ matrix.container-suffix }}
2626
strategy:
2727
fail-fast: false

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
# Why is it a JSON string?
1010
# https://github.com/orgs/community/discussions/11692#discussioncomment-3541856
1111
runner:
12-
default: "['ubuntu-24.04']"
12+
default: ubuntu-22.04-m
1313
required: false
1414
type: string
1515
rosdistro:
@@ -39,7 +39,7 @@ env:
3939
jobs:
4040
build-and-test-differential:
4141
if: ${{ inputs.run-condition }}
42-
runs-on: ${{ fromJson(inputs.runner) }}
42+
runs-on: ${{ inputs.runner }}
4343
container: ${{ inputs.container }}${{ inputs.container-suffix }}
4444
steps:
4545
- name: Set PR fetch depth

.github/workflows/build-test-tidy-pr.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
container: ghcr.io/autowarefoundation/autoware:universe-devel
6161
run-condition: ${{ needs.require-label.outputs.result == 'true' }}
62-
runner: "['self-hosted', 'Linux', 'X64']"
62+
runner: ubuntu-22.04-m
6363
secrets:
6464
codecov-token: ${{ secrets.CODECOV_TOKEN }}
6565

@@ -71,7 +71,7 @@ jobs:
7171
container: ghcr.io/autowarefoundation/autoware:universe-devel
7272
container-suffix: -cuda
7373
run-condition: ${{ needs.check-if-cuda-job-is-needed.outputs.cuda_job_is_needed == 'true' }}
74-
runner: "['self-hosted', 'Linux', 'X64']"
74+
runner: ubuntu-22.04-m
7575
secrets:
7676
codecov-token: ${{ secrets.CODECOV_TOKEN }}
7777

@@ -95,4 +95,4 @@ jobs:
9595
container: ghcr.io/autowarefoundation/autoware:universe-devel
9696
container-suffix: -cuda
9797
run-condition: ${{ needs.check-if-cuda-job-is-needed.outputs.cuda_job_is_needed == 'true' && needs.build-and-test-differential-cuda.result == 'success' }}
98-
runner: "['self-hosted', 'Linux', 'X64']"
98+
runner: ubuntu-22.04-m
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file is automatically synced from:
2+
# https://github.com/autowarefoundation/sync-file-templates
3+
# To make changes, update the source repository and follow the guidelines in its README.
4+
5+
# Deprecated: Use concurrency in each workflow instead.
6+
7+
name: cancel-previous-workflows
8+
9+
on:
10+
pull_request_target:
11+
12+
jobs:
13+
cancel-previous-workflows:
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- name: Cancel previous runs
17+
uses: styfle/cancel-workflow-action@0.12.1
18+
with:
19+
workflow_id: all
20+
all_but_latest: true

.github/workflows/clang-tidy-differential.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
# Why is it a JSON string?
1414
# https://github.com/orgs/community/discussions/11692#discussioncomment-3541856
1515
runner:
16-
default: "['ubuntu-24.04']"
16+
default: ubuntu-22.04-m
1717
required: false
1818
type: string
1919
run-condition:
@@ -24,7 +24,7 @@ on:
2424
jobs:
2525
clang-tidy-differential:
2626
if: ${{ inputs.run-condition }}
27-
runs-on: ${{ fromJson(inputs.runner) }}
27+
runs-on: ${{ inputs.runner }}
2828
container: ${{ inputs.container }}${{ inputs.container-suffix }}
2929
steps:
3030
- name: Set PR fetch depth
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: AI PR Comment Analysis
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
analyze-comment:
9+
# Only run on PR comments that start with the trigger phrase
10+
if: |
11+
github.event.issue.pull_request &&
12+
startsWith(github.event.comment.body, '@co-pilot-auto')
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
steps:
19+
- name: Debug PR reviewer information
20+
uses: actions/github-script@v7
21+
with:
22+
script: |
23+
console.log('Comment author:', context.payload.comment.user.login);
24+
console.log('PR author:', context.payload.issue.user.login);
25+
26+
// Get PR details to see reviewers
27+
const prNumber = context.payload.issue.number;
28+
const { data: prData } = await github.rest.pulls.get({
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
pull_number: prNumber
32+
});
33+
34+
console.log('Requested reviewers:', JSON.stringify(prData.requested_reviewers));
35+
36+
const reviewerLogins = prData.requested_reviewers.map(reviewer => reviewer.login);
37+
console.log('Reviewer logins:', reviewerLogins);
38+
39+
const isCommentFromPRAuthor = context.payload.comment.user.login === context.payload.issue.user.login;
40+
const isCommentFromReviewer = reviewerLogins.includes(context.payload.comment.user.login);
41+
42+
console.log('Is comment from PR author?', isCommentFromPRAuthor);
43+
console.log('Is comment from reviewer?', isCommentFromReviewer);
44+
console.log('Should proceed?', isCommentFromPRAuthor || isCommentFromReviewer);
45+
46+
// Store this information for later steps
47+
core.exportVariable('SHOULD_PROCEED', isCommentFromPRAuthor || isCommentFromReviewer);
48+
49+
- name: Generate token
50+
id: generate-token
51+
if: env.SHOULD_PROCEED == 'true'
52+
uses: actions/create-github-app-token@v1
53+
with:
54+
app_id: ${{ secrets.INTERNAL_APP_ID }}
55+
private_key: ${{ secrets.INTERNAL_PRIVATE_KEY }}
56+
owner: ${{ github.repository_owner }}
57+
58+
- name: Checkout repository
59+
if: env.SHOULD_PROCEED == 'true'
60+
uses: actions/checkout@v4
61+
62+
- name: Call PR analysis workflow
63+
if: env.SHOULD_PROCEED == 'true'
64+
uses: actions/github-script@v7
65+
with:
66+
github-token: ${{ steps.generate-token.outputs.token }}
67+
script: |
68+
const commentBody = context.payload.comment.body;
69+
const commenter = context.payload.comment.user.login;
70+
const prNumber = context.payload.issue.number;
71+
const runId = context.runId;
72+
const workflowRunUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`;
73+
74+
// Post acknowledgment comment with workflow run link
75+
await github.rest.issues.createComment({
76+
issue_number: prNumber,
77+
owner: context.repo.owner,
78+
repo: context.repo.repo,
79+
body: `@${commenter} 🔄 Co-Pilot-Auto Client Triggered... Please wait for the results.\n\nView Client trigger workflow progress: [GitHub Actions Run](${workflowRunUrl})`
80+
});
81+
82+
// Call the reusable workflow in the analyzer repository
83+
await github.rest.actions.createWorkflowDispatch({
84+
owner: 'tier4',
85+
repo: 'llm_pr_analyzer',
86+
workflow_id: 'co-pilot-auto-server.yml', // The filename of the reusable workflow
87+
ref: 'pilot-auto-branch', // The branch where the workflow is defined
88+
inputs: {
89+
repo: `${context.repo.owner}/${context.repo.repo}`,
90+
pr_number: `${prNumber}`,
91+
comment_body: commentBody,
92+
commenter: commenter,
93+
}
94+
});
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This file is automatically synced from:
2+
# https://github.com/autowarefoundation/sync-file-templates
3+
# To make changes, update the source repository and follow the guidelines in its README.
4+
5+
name: pre-commit-autoupdate
6+
7+
on:
8+
schedule:
9+
- cron: 0 0 1 1,4,7,10 * # quarterly
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
pre-commit-autoupdate:
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Generate token
21+
id: generate-token
22+
uses: tibdex/github-app-token@v2
23+
with:
24+
app_id: ${{ secrets.APP_ID }}
25+
private_key: ${{ secrets.PRIVATE_KEY }}
26+
27+
- name: Run pre-commit-autoupdate
28+
uses: autowarefoundation/autoware-github-actions/pre-commit-autoupdate@v1
29+
with:
30+
token: ${{ steps.generate-token.outputs.token }}
31+
pre-commit-config: .pre-commit-config.yaml
32+
pr-labels: |
33+
tag:bot
34+
tag:pre-commit-autoupdate
35+
pr-branch: pre-commit-autoupdate
36+
pr-title: "ci(pre-commit): autoupdate"
37+
pr-commit-message: "ci(pre-commit): autoupdate"
38+
auto-merge-method: squash
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This file is automatically synced from:
2+
# https://github.com/autowarefoundation/sync-file-templates
3+
# To make changes, update the source repository and follow the guidelines in its README.
4+
5+
name: pre-commit-optional-autoupdate
6+
7+
on:
8+
schedule:
9+
- cron: 0 0 1 1,4,7,10 * # quarterly
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
pre-commit-optional-autoupdate:
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Generate token
21+
id: generate-token
22+
uses: tibdex/github-app-token@v2
23+
with:
24+
app_id: ${{ secrets.APP_ID }}
25+
private_key: ${{ secrets.PRIVATE_KEY }}
26+
27+
- name: Run pre-commit-autoupdate
28+
uses: autowarefoundation/autoware-github-actions/pre-commit-autoupdate@v1
29+
with:
30+
token: ${{ steps.generate-token.outputs.token }}
31+
pre-commit-config: .pre-commit-config-optional.yaml
32+
pr-labels: |
33+
tag:bot
34+
tag:pre-commit-autoupdate
35+
pr-branch: pre-commit-optional-autoupdate
36+
pr-title: "ci(pre-commit-optional): autoupdate"
37+
pr-commit-message: "ci(pre-commit-optional): autoupdate"
38+
auto-merge-method: squash
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Sync Workflows
2+
3+
on:
4+
schedule:
5+
# Run every day at midnight JST (15:00 UTC, since JST = UTC+9)
6+
- cron: 0 15 * * *
7+
workflow_dispatch:
8+
jobs:
9+
sync-workflows:
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Generate token
17+
id: generate-token
18+
uses: tibdex/github-app-token@v2
19+
with:
20+
app_id: ${{ secrets.APP_ID }}
21+
private_key: ${{ secrets.PRIVATE_KEY }}
22+
23+
- name: Set git config
24+
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
25+
with:
26+
token: ${{ steps.generate-token.outputs.token }}
27+
28+
- name: Install Python and Poetry
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: "3.10"
32+
33+
- name: Install Poetry v1.8.3
34+
run: |
35+
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.3 python3 -
36+
poetry install
37+
38+
- name: Sync workflows from upstream
39+
env:
40+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
41+
run: |
42+
poetry run python -m scripts.sync_workflows
43+
44+
- name: Check for changes
45+
id: changes
46+
run: |
47+
if [ -z "$(git status --porcelain)" ]; then
48+
echo "No changes detected"
49+
echo "has_changes=false" >> $GITHUB_OUTPUT
50+
else
51+
echo "Changes detected"
52+
echo "has_changes=true" >> $GITHUB_OUTPUT
53+
fi
54+
55+
- name: Create Pull Request
56+
if: steps.changes.outputs.has_changes == 'true'
57+
id: create-pr
58+
uses: peter-evans/create-pull-request@v5
59+
with:
60+
token: ${{ steps.generate-token.outputs.token }}
61+
reviewers: rej55
62+
commit-message: |
63+
feat: sync workflows from upstream
64+
65+
Automated workflow sync from autowarefoundation/autoware_universe to tier4/autoware_universe
66+
67+
Scheduled run: ${{ github.run_id }}
68+
title: "feat: sync workflows from upstream"
69+
body: |
70+
## 🔄 Automated Workflow Sync
71+
72+
This PR contains workflow updates synced from the upstream repository [`autowarefoundation/autoware_universe`](https://github.com/autowarefoundation/autoware_universe) to [`tier4/autoware_universe`](https://github.com/tier4/autoware_universe).
73+
74+
### Changes
75+
- Synced workflows according to `workflow_sync_setting.yaml`
76+
- Applied any necessary modifications for TIER IV environment
77+
78+
**Triggered by**: Scheduled run at midnight JST
79+
**Run ID**: [${{ github.run_id }}](https://github.com/tier4/autoware_universe/actions/runs/${{ github.run_id }})
80+
**Timestamp**: ${{ github.event.repository.updated_at }}
81+
82+
---
83+
*This PR was created automatically by the workflow sync process.*
84+
branch: sync-workflows/automated-${{ github.run_id }}
85+
delete-branch: true
86+
87+
- name: Report sync results
88+
if: always()
89+
run: |
90+
echo "## Workflow Sync Results" >> $GITHUB_STEP_SUMMARY
91+
echo "" >> $GITHUB_STEP_SUMMARY
92+
if [ "${{ steps.changes.outputs.has_changes }}" == "true" ]; then
93+
echo "✅ **Changes detected and processed**" >> $GITHUB_STEP_SUMMARY
94+
echo "📝 **Pull request created** for review" >> $GITHUB_STEP_SUMMARY
95+
if [ -n "${{ steps.create-pr.outputs.pull-request-url }}" ]; then
96+
echo "🔗 **PR Link**: ${{ steps.create-pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
97+
fi
98+
else
99+
echo "ℹ️ **No changes needed** - workflows are up to date" >> $GITHUB_STEP_SUMMARY
100+
fi
101+
echo "" >> $GITHUB_STEP_SUMMARY
102+
echo "**Run timestamp**: $(date -u +"%Y-%m-%d %H:%M:%S UTC")" >> $GITHUB_STEP_SUMMARY
103+
echo "**Japan time**: $(TZ='Asia/Tokyo' date +"%Y-%m-%d %H:%M:%S JST")" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)