Skip to content

Commit 6a1af96

Browse files
committed
Resolve conflicts
Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com>
2 parents 8d04944 + 819111f commit 6a1af96

15 files changed

+387
-131
lines changed

.github/sync-files.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- source: .github/PULL_REQUEST_TEMPLATE/small-change.md
1212
- source: .github/PULL_REQUEST_TEMPLATE/standard-change.md
1313
- source: .github/dependabot.yaml
14+
- source: .github/workflows/backport.yaml
1415
- source: .github/stale.yml
1516
- source: .github/workflows/github-release.yaml
1617
- 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
@@ -29,6 +29,14 @@ jobs:
2929
- name: Show disk space before the tasks
3030
run: df -h
3131

32+
- name: Free disk space (Ubuntu)
33+
uses: jlumbroso/free-disk-space@v1.3.1
34+
with:
35+
tool-cache: false
36+
dotnet: false
37+
swap-storage: false
38+
large-packages: false
39+
3240
- name: Remove exec_depend
3341
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
3442

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

-41
This file was deleted.

.github/workflows/comment-on-pr.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: comment-on-pr
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
branches:
8+
- beta/v0.[0-9]+.[1-9]+
9+
10+
jobs:
11+
comment:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Create comments
15+
run: |
16+
cat << EOF > comments
17+
### Merging guidelines for the beta branch
18+
Please use `Squash and merge` as the default.
19+
However, when incorporating multiple changes with cherry-pick, use a `Create a merge commit` to preserve the changes in the history.
20+
EOF
21+
- name: Post comments
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
URL: ${{ github.event.pull_request.html_url }}
25+
run: gh pr comment -F ./comments "${URL}"
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

0 commit comments

Comments
 (0)