From 163de5bc8d9e94c8332cd0f8e5ce445beaecc8fc Mon Sep 17 00:00:00 2001 From: pawelirh Date: Wed, 5 Jun 2024 09:34:28 +0000 Subject: [PATCH] Update branch naming in release workflows --- .github/workflows/release-candidate.yaml | 4 +-- .github/workflows/release-project.yaml | 31 +++++++++++++++++++---- .github/workflows/release-repository.yaml | 4 +-- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-candidate.yaml b/.github/workflows/release-candidate.yaml index 1b8888a69..f9d061600 100644 --- a/.github/workflows/release-candidate.yaml +++ b/.github/workflows/release-candidate.yaml @@ -38,7 +38,7 @@ jobs: repository_owner: husarion repository_name: ${{ matrix.repo }} new_branch_name: ${{ env.RC_BRANCH_NAME }} - new_branch_ref: ros2 + new_branch_ref: ros2-devel access_token: ${{ secrets.GH_PAT}} update_tags_in_compose: @@ -58,7 +58,7 @@ jobs: wait_interval: 10 client_payload: | { - "target_branch": "${{ env.RC_BRANCH_NAME }}", + "source_branch": "${{ env.RC_BRANCH_NAME }}", "image_tag": "humble-${{ env.RC_BRANCH_NAME }}" } diff --git a/.github/workflows/release-project.yaml b/.github/workflows/release-project.yaml index d4c932e6f..728fb6021 100644 --- a/.github/workflows/release-project.yaml +++ b/.github/workflows/release-project.yaml @@ -76,10 +76,31 @@ jobs: "prerelease": "${{ github.event.inputs.prerelease }}" } + rebuild_and_push_docker_images: + name: Rebuild panther docker images with new version + runs-on: ubuntu-22.04 + needs: + - release_panther_ros + steps: + - name: Trigger repository build workflow + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: husarion + repo: panther-docker + github_token: ${{ secrets.GH_PAT }} + workflow_file_name: ros-docker-image.yaml + ref: ${{ env.RC_BRANCH_NAME }} + wait_interval: 10 + client_payload: | + { + "build_type": "development", + "target_distro": "humble" + } + release_panther_docker: name: Release panther-docker repository needs: - - release_panther_ros + - rebuild_and_push_docker_images runs-on: ubuntu-22.04 steps: - name: Trigger repository release workflow @@ -93,7 +114,7 @@ jobs: wait_interval: 10 client_payload: | { - "target_branch": "${{ env.RC_BRANCH_NAME }}", + "source_branch": "${{ env.RC_BRANCH_NAME }}", "version": "${{ github.event.inputs.version }}", "date": "${{ github.event.inputs.date }}", "release_name": "${{ github.event.inputs.release_name }}", @@ -101,8 +122,8 @@ jobs: "prerelease": "${{ github.event.inputs.prerelease }}" } - build_and_push_docker_images: - name: Build panther docker images + tag_docker_images: + name: Tag panther docker images as stable if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }} needs: - release_panther_docker @@ -143,7 +164,7 @@ jobs: wait_interval: 10 client_payload: | { - "target_branch": "${{ env.RC_BRANCH_NAME }}", + "source_branch": "${{ env.RC_BRANCH_NAME }}", "version": "${{ github.event.inputs.version }}", "release_name": "${{ github.event.inputs.release_name }}", "automatic_mode": "${{ github.event.inputs.automatic_mode }}", diff --git a/.github/workflows/release-repository.yaml b/.github/workflows/release-repository.yaml index efbc24d7e..2ea2556d0 100644 --- a/.github/workflows/release-repository.yaml +++ b/.github/workflows/release-repository.yaml @@ -5,10 +5,10 @@ on: workflow_dispatch: inputs: source_branch: - description: Source branch for the release + description: Source branch for the release. required: true target_branch: - description: Target branch for the release + description: Target branch for the release. required: false default: ros2 version: