Skip to content

Prepare test branch

Prepare test branch #2

---
name: Prepare test branch
on:
workflow_dispatch:
inputs:
target_branch:
description: Target branch for the pre-release test.
required: true
test_branch:
description: Test branch name (used as a docker image tag).
required: true
jobs:
release:
name: Release repository
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE_TAG: humble-${{ github.event.inputs.test_branch }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.target_branch }}
- name: Update docker image version
uses: mikefarah/yq@v4.43.1
with:
cmd: |
yq -i '.services.panther_ros.image = "husarion/panther:${{ env.DOCKER_IMAGE_TAG }}" | (... | select(tag == "!!merge")) tag = ""' demo/compose.minimal-setup.yaml
yq -i '.services.panther_gazebo.image = "husarion/panther-gazebo:${{ env.DOCKER_IMAGE_TAG }}" | (... | select(tag == "!!merge")) tag = ""' demo/compose.simulation.yaml
- name: Commit changes to test branch
uses: EndBug/add-and-commit@v9
with:
message: Update docker image version
author_name: action-bot
author_email: action-bot@action-bot.com
new_branch: ${{ github.event.inputs.test_branch }}