Skip to content

Commit

Permalink
ci: PLT-590: Add deploy job
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitabelonogov committed Dec 10, 2024
1 parent 4e1f1b9 commit 232d5b3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/cicd_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 232d5b3

Please sign in to comment.