Skip to content

Commit

Permalink
Merge branch 'beta/v0.37' into sync-awf-upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Hayato Mizushima <[email protected]>
  • Loading branch information
hayato-m126 committed Oct 17, 2024
2 parents 87c0f90 + fdec55d commit 4519ddf
Show file tree
Hide file tree
Showing 14 changed files with 384 additions and 129 deletions.
1 change: 1 addition & 0 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- source: .github/PULL_REQUEST_TEMPLATE/small-change.md
- source: .github/PULL_REQUEST_TEMPLATE/standard-change.md
- source: .github/dependabot.yaml
- source: .github/workflows/backport.yaml
- source: .github/stale.yml
- source: .github/workflows/github-release.yaml
- source: .github/workflows/pre-commit.yaml
Expand Down
80 changes: 0 additions & 80 deletions .github/update-sync-param-files.py

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: backport
on:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- uses: tibdex/backport@v2
with:
github_token: ${{ steps.generate-token.outputs.token }}
title_template: "<%= title %> (backport #<%= number %>)"
34 changes: 34 additions & 0 deletions .github/workflows/beta-to-tier4-main-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: beta-to-tier4-main-sync

on:
workflow_dispatch:
inputs:
source_branch:
description: Source branch
required: true
type: string

jobs:
sync-beta-branch:
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 }}

- name: Run sync-branches
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
with:
token: ${{ steps.generate-token.outputs.token }}
base-branch: tier4/main
sync-pr-branch: beta-to-tier4-main-sync
sync-target-repository: https://github.com/tier4/autoware_launch.git
sync-target-branch: ${{ inputs.source_branch }}
pr-title: "chore: sync beta branch ${{ inputs.source_branch }} with tier4/main"
pr-labels: |
bot
sync-beta-branch
auto-merge-method: merge
8 changes: 8 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
- name: Show disk space before the tasks
run: df -h

- name: Free disk space (Ubuntu)
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
swap-storage: false
large-packages: false

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1

Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/check-build-depends.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/comment-on-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: comment-on-pr

on:
pull_request:
types:
- opened
branches:
- beta/v0.[0-9]+.[1-9]+

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Create comments
run: |
cat << EOF > comments
### Merging guidelines for the beta branch
Please use `Squash and merge` as the default.
However, when incorporating multiple changes with cherry-pick, use a `Create a merge commit` to preserve the changes in the history.
EOF
- name: Post comments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
URL: ${{ github.event.pull_request.html_url }}
run: gh pr comment -F ./comments "${URL}"
44 changes: 44 additions & 0 deletions .github/workflows/dispatch-release-note.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: dispatch-release-note
on:
push:
branches:
- beta/v*
- tier4/main
tags:
- v*
workflow_dispatch:
inputs:
beta-branch-or-tag-name:
description: The name of the beta branch or tag to write release note
type: string
required: true
jobs:
dispatch-release-note:
runs-on: ubuntu-latest
name: release-repository-dispatch
steps:
- name: Set ref name
id: set-ref-name
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}"
else
REF_NAME="${{ github.ref_name }}"
fi
echo ::set-output name=ref-name::"${{ github.repository }}/'$REF_NAME'"
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Repository dispatch for release note
run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ steps.generate-token.outputs.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/tier4/update-release-notes/dispatches" \
-d '{"event_type":"${{ steps.set-ref-name.outputs.ref-name }}"}'
30 changes: 30 additions & 0 deletions .github/workflows/sync-awf-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: sync-awf-latest

on:
schedule:
- cron: 50 */1 * * * # every 1 hour (**:50)
workflow_dispatch:

jobs:
sync-awf-latest:
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 }}

- name: Run sync-branches
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
with:
token: ${{ steps.generate-token.outputs.token }}
base-branch: awf-latest
sync-pr-branch: sync-awf-latest
sync-target-repository: https://github.com/autowarefoundation/autoware_launch.git
sync-target-branch: main
pr-title: "chore: sync awf-latest"
pr-labels: |
bot
auto-merge-method: merge
53 changes: 53 additions & 0 deletions .github/workflows/sync-awf-upstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
Loading

0 comments on commit 4519ddf

Please sign in to comment.