Skip to content

Commit

Permalink
Merge branch 'beta/v0.40' into sync-awf-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
xtk8532704 authored Dec 12, 2024
2 parents ad7ef8a + 7d9aeae commit f01d143
Show file tree
Hide file tree
Showing 14 changed files with 360 additions and 130 deletions.
1 change: 1 addition & 0 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- source: .github/ISSUE_TEMPLATE/task.yaml
- source: .github/pull_request_template.md
- source: .github/dependabot.yaml
- source: .github/workflows/backport.yaml
- source: .github/stale.yml
- source: .github/workflows/comment-on-pr.yaml
- source: .github/workflows/github-release.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 @@ -33,6 +33,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.

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
32 changes: 32 additions & 0 deletions .github/workflows/sync-beta-upstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow is intended for the use in the repositories created by forking tier4/autoware_launch.
name: sync-beta-upstream

on:
schedule:
- cron: 0 20 * * *
workflow_dispatch:

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

- name: Run sync-branches
uses: autowarefoundation/autoware-github-actions/sync-branches@v1
with:
token: ${{ steps.generate-token.outputs.token }}
base-branch: beta/<version>
sync-pr-branch: sync-beta-upstream
sync-target-repository: https://github.com/tier4/autoware_launch.git
sync-target-branch: beta/<version>
pr-title: "chore: sync beta upstream"
pr-labels: |
bot
sync-tier4-upstream
auto-merge-method: merge
Loading

0 comments on commit f01d143

Please sign in to comment.