-
Notifications
You must be signed in to change notification settings - Fork 4
142 lines (140 loc) · 4.19 KB
/
deploy_workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: deploy_workflow
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
push:
branches:
- "master"
paths:
- ./workflow_templates/**
- ./.github/workflows/deploy_workflow.yaml
jobs:
get_template:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/upload-artifact@v4
with:
name: templates
path: ./workflow_templates/*.yaml
deploy_workflow:
needs: get_template
runs-on: ubuntu-22.04
strategy:
max-parallel: 2
fail-fast: false
matrix:
package_name: [
boost_geometry_util,
color_names,
data_buffer,
detic_onnx_ros2,
geographic_conversion,
geographic_info,
grid_map_type_adapter,
hermite_path_planner,
hungarian_solver,
image_processing_utils,
joy_to_twist,
lidar_camera_fusion,
lua_vendor,
message_synchronizer,
navi_sim,
nmea_hardware_interface,
nmea_to_geopose,
odom_frame_publisher,
ouxt_common,
pcl_apps,
pcl_type_adapter,
perception_bringup,
perception_msgs,
perception_server,
playstation_controller_drivers,
point_painting,
prometheus_ros,
protolink,
quaternion_operation,
robotx_behavior_tree,
robotx_communication,
robotx_costmap_calculator,
robotx_ekf,
robotx_planner_bringup,
scan_segmentation,
sol_vendor,
tcp_sender,
usv_controller,
vision_opencv,
wamv_control,
wamv_description,
]
steps:
- uses: actions/download-artifact@v4
with:
name: templates
path: ~/templates
- uses: actions/checkout@v4
with:
repository: OUXT-Polaris/${{ matrix.package_name }}
token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
- name: Deploy build test workflow
uses: OUXT-Polaris/setup-workflow-action@0.0.1
with:
template: /home/runner/templates/BuildTest.yaml
project_path: ./
parameters: "{}"
- name: Deploy release workflow
uses: OUXT-Polaris/setup-workflow-action@0.0.1
with:
template: /home/runner/templates/Release.yaml
project_path: ./
parameters: "{}"
- name: Deploy update workflow status workflow
uses: OUXT-Polaris/setup-workflow-action@0.0.1
with:
template: /home/runner/templates/UpdateWorkflowStatus.yaml
project_path: ./
parameters: "{}"
- name: Deploy code review workflow
uses: OUXT-Polaris/setup-workflow-action@0.0.1
with:
template: /home/runner/templates/Review.yaml
project_path: ./
parameters: "{}"
- name: Check branch exist
id: check_branch
run: |
echo "name=exist::$(git ls-remote --heads https://github.com/OUXT-Polaris/${{ matrix.package_name }}.git workflow/sync | wc -l)" >> "$GITHUB_OUTPUT"
- name: Check if branch exists
id: check_branch_exist
run: |
if git ls-remote --heads https://github.com/OUXT-Polaris/${{ matrix.package_name }}.git workflow/sync | grep -q 'refs/heads/workflow/sync'; then
echo "exist=true" >> "$GITHUB_OUTPUT"
else
echo "exist=false" >> "$GITHUB_OUTPUT"
fi
- uses: peter-evans/create-pull-request@v3
id: create_pull_request
if: steps.check_branch_exist.outputs.exist == 'false'
with:
token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
commit-message: Setup workflow
committer: wam-v-tan <ouxt.share@gmail.com>
author: wam-v-tan <ouxt.share@gmail.com>
signoff: false
branch: workflow/sync
base: ${{ steps.check_default_branch.outputs.default_branch }}
delete-branch: true
title: '[Bot] Update workflow'
body: |
# Description
Setup Build test workflow
# How to check
Please check passing all CI test.
labels: |
bot
assignees: wam-v-tan
reviewers: wam-v-tan
team-reviewers: |
bot
draft: false