forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/beta/v0.16.0' into sync-upstream
- Loading branch information
Showing
7 changed files
with
211 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.universe.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: dispatch-push-event | ||
on: | ||
push: | ||
|
||
jobs: | ||
search-dispatch-repo: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- { version: beta/v0.3.**, dispatch-repo: pilot-auto.x1.eve } | ||
outputs: | ||
dispatch-repo: ${{ steps.search-dispatch-repo.outputs.value }} | ||
steps: | ||
- name: Search dispatch repo | ||
id: search-dispatch-repo | ||
run: | | ||
if [[ ${{ github.ref_name }} =~ ${{ matrix.version }} ]]; then | ||
echo ::set-output name=value::"${{ matrix.dispatch-repo }}" | ||
echo "Detected beta branch: ${{ github.ref_name }}" | ||
echo "Dispatch repository: ${{ matrix.dispatch-repo }}" | ||
fi | ||
dispatch-push-event: | ||
runs-on: ubuntu-latest | ||
needs: search-dispatch-repo | ||
if: ${{ needs.search-dispatch-repo.outputs.dispatch-repo != '' }} | ||
steps: | ||
- name: Generate token | ||
id: generate-token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.INTERNAL_APP_ID }} | ||
private_key: ${{ secrets.INTERNAL_PRIVATE_KEY }} | ||
|
||
# 注意: workflow_dispatchで指定するブランチはmain固定となっているため、dispatch-repoのmainブランチにupdate-beta-branch.yamlが存在することが前提条件。 | ||
- name: Dispatch the update-beta-branch workflow | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/tier4/${{ needs.search-dispatch-repo.outputs.dispatch-repo }}/actions/workflows/update-beta-branch.yaml/dispatches \ | ||
-d '{"ref":"main"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
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 tag name | ||
id: set-tag-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::"$REF_NAME" | ||
echo ::set-output name=tag-name::"${REF_NAME#beta/}" | ||
- 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-tag-name.outputs.ref-name }}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: slack-send | ||
on: | ||
workflow_run: | ||
workflows: | ||
- build-and-test | ||
types: | ||
- completed | ||
|
||
jobs: | ||
on-failure: | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Send to Slack workflow | ||
uses: slackapi/slack-github-action@v1 | ||
with: | ||
payload: | | ||
{ | ||
"workflow-url": "${{ github.event.workflow_run.html_url }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WORKFLOW_WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: sync-upstream | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target_branch: | ||
description: Target branch | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
sync-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 | ||
if: ${{ inputs.target_branch != 'tier4/main' }} | ||
uses: autowarefoundation/autoware-github-actions/sync-branches@v1 | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
base-branch: ${{ inputs.target_branch }} | ||
sync-pr-branch: sync-upstream | ||
sync-target-repository: https://github.com/autowarefoundation/autoware.universe.git | ||
sync-target-branch: main | ||
pr-title: "chore: sync upstream" | ||
auto-merge-method: merge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters