-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflow for tagging in compose files (#51)
* Update workflow for tagging in compose files * Remove unused env
- Loading branch information
Showing
1 changed file
with
9 additions
and
11 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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
--- | ||
name: Prepare test branch | ||
name: Update tags in compose files | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target_branch: | ||
description: Target branch for the pre-release test. | ||
description: Target branch for the update. | ||
required: true | ||
test_branch: | ||
description: Test branch name (used as a docker image tag). | ||
image_tag: | ||
description: Docker image tag to be replaced with. | ||
required: true | ||
|
||
jobs: | ||
|
@@ -17,24 +17,22 @@ jobs: | |
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 | ||
- name: Update docker image tag | ||
uses: mikefarah/[email protected] | ||
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 | ||
yq -i '.services.panther_ros.image = "husarion/panther:${{ github.event.inputs.image_tag }}" | (... | select(tag == "!!merge")) tag = ""' demo/compose.minimal-setup.yaml | ||
yq -i '.services.panther_gazebo.image = "husarion/panther-gazebo:${{ github.event.inputs.image_tag }}" | (... | select(tag == "!!merge")) tag = ""' demo/compose.simulation.yaml | ||
- name: Commit changes to test branch | ||
- name: Commit changes to target branch | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: Update docker image version | ||
message: Update docker image tag | ||
author_name: action-bot | ||
author_email: [email protected] | ||
new_branch: ${{ github.event.inputs.test_branch }} |