-
Notifications
You must be signed in to change notification settings - Fork 11
108 lines (97 loc) · 3.33 KB
/
release-candidate.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
---
name: Release Candidate
on:
workflow_dispatch:
inputs:
version:
description: Release candidate version (format `X.X.X`, e.g. `2.0.1`).
required: true
date:
description: Release candidate date stamp (format `YYYYMMDD`, e.g. `20240430`).
required: true
env:
RC_BRANCH_NAME: ${{ github.event.inputs.version }}-${{ github.event.inputs.date }}
jobs:
docs:
name: Docs
runs-on: ubuntu-22.04
steps:
- name: Check docs build
uses: convictional/[email protected]
with:
owner: husarion
repo: docs_new
github_token: ${{ secrets.RAFAL_ACCESS_TOKEN }}
workflow_file_name: test-release.yml
ref: master
client_payload: '{"husarion_ugv_branch": "ros2-devel"}'
# TODO: Add unit testing when ready
unit_tests:
name: Unit tests
runs-on: ubuntu-22.04
steps:
- name: Run unit tests
run: echo "Unit tests for panther_ros are not fully implemented yet -> SKIPPING!"
docker:
name: Docker
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch_name }}
- name: Update docker image tag
uses: mikefarah/[email protected]
with:
cmd: |
sed -i 's/\(husarion\/panther:humble-\)[^[:space:]]*/\1${{ env.RC_BRANCH_NAME }}/g' docker/demo/compose.hardware.yaml
sed -i 's/\(husarion\/panther-gazebo:humble-\)[^[:space:]]*/\1${{ env.RC_BRANCH_NAME }}/g' docker/demo/compose.simulation.yaml
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: Update tags in compose files
author_name: action-bot
author_email: [email protected]
new_branch: ${{ env.RC_BRANCH_NAME }}
- name: Build Docker
uses: ./.github/workflows/build-docker.yaml
with:
build_type: development
os_image:
name: OS image
runs-on: ubuntu-22.04
steps:
- name: Create new branch
uses: GuillaumeFalourd/[email protected]
with:
repository_owner: husarion
repository_name: panther-rpi-os-img
new_branch_name: ${{ env.RC_BRANCH_NAME }}
new_branch_ref: ros2-devel
access_token: ${{ secrets.RAFAL_ACCESS_TOKEN}}
- name: Build OS image
uses: convictional/[email protected]
with:
owner: husarion
repo: panther-rpi-os-img
github_token: ${{ secrets.RAFAL_ACCESS_TOKEN }}
workflow_file_name: build_and_deploy_image.yaml
ref: ${{ env.RC_BRANCH_NAME }}
client_payload: |
{
"dev_image": "true",
"husarion_ugv_version": "${{ env.RC_BRANCH_NAME }}",
"image_tag": "${{ github.event.inputs.version }}"
}
- name: Build flash OS image
uses: convictional/[email protected]
with:
owner: husarion
repo: panther-rpi-os-img
github_token: ${{ secrets.RAFAL_ACCESS_TOKEN }}
workflow_file_name: build_and_deploy_flash_os_image.yaml
ref: ${{ env.RC_BRANCH_NAME }}
client_payload: |
{
"image_tag": "${{ github.event.inputs.version }}"
}