From 232d5b3309fa135b8e2242241335157509a17e8f Mon Sep 17 00:00:00 2001 From: Nikita Belonogov Date: Tue, 10 Dec 2024 19:30:30 +0400 Subject: [PATCH] ci: PLT-590: Add deploy job --- .github/workflows/cicd_pipeline.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/cicd_pipeline.yml b/.github/workflows/cicd_pipeline.yml index ecb59db831f2..2db4f7ee55d4 100644 --- a/.github/workflows/cicd_pipeline.yml +++ b/.github/workflows/cicd_pipeline.yml @@ -190,6 +190,34 @@ jobs: branch_name: ${{ github.event.pull_request.head.ref || github.ref_name }} secrets: inherit + deploy: + name: "Deploy" + if: startsWith(github.ref_name, 'ls-release/') || github.ref_name == 'develop' + runs-on: ubuntu-latest + needs: + - build-docker + steps: + - uses: actions/github-script@v7 + env: + DOCKER_IMAGE_VERSION: ${{ needs.build-docker.outputs.image_version }} + APP_NAME: ${{ startsWith(github.ref_name, 'ls-release/') && 'ls-release' || 'ls-develop' }} + with: + github-token: ${{ secrets.GIT_PAT }} + script: | + const docker_image_version = process.env.DOCKER_IMAGE_VERSION; + const app_name = process.env.APP_NAME; + github.rest.actions.createWorkflowDispatch({ + owner: "HumanSignal", + repo: "label-studio-enterprise", + workflow_id: "argocd-deploy.yml", + ref: "develop", + inputs: { + docker_image_version: docker_image_version, + app_name: app_name, + template_name: "lso", + } + }); + pytest: name: "Tests" needs: