Release Candidate #39
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
--- | |
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!" | |
create_branches: | |
name: Create branches | |
runs-on: ubuntu-22.04 | |
needs: | |
- unit_tests | |
strategy: | |
matrix: | |
repo: [panther_ros, panther-rpi-os-img] | |
steps: | |
- name: Create release candidate branch | |
uses: GuillaumeFalourd/[email protected] | |
with: | |
repository_owner: husarion | |
repository_name: ${{ matrix.repo }} | |
new_branch_name: ${{ env.RC_BRANCH_NAME }} | |
new_branch_ref: ros2-devel | |
access_token: ${{ secrets.RAFAL_ACCESS_TOKEN}} | |
update_tags_in_compose: | |
name: Update tags in compose | |
runs-on: ubuntu-22.04 | |
needs: | |
- create_branches | |
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] | |
docker: | |
name: Docker | |
runs-on: ubuntu-22.04 | |
needs: | |
- update_tags_in_compose | |
steps: | |
- name: Build Docker | |
uses: ./.github/workflows/build-docker.yml | |
with: | |
build_type: development | |
os_image: | |
name: OS image | |
needs: | |
- update_tags_in_compose | |
runs-on: ubuntu-22.04 | |
steps: | |
- 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", | |
"panther_codebase_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 }}" | |
} |