From 2c88fd49a4150a29bcee7436fa62452136fde140 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 4 Jan 2024 14:21:42 +0530 Subject: [PATCH] (ci/cd) trigger new release on docker deploys --- .github/workflows/ghcr_deploy.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.yml index 32b23531f..346385519 100644 --- a/.github/workflows/ghcr_deploy.yml +++ b/.github/workflows/ghcr_deploy.yml @@ -78,3 +78,26 @@ jobs: push: true tags: ${{ steps.meta-alpine.outputs.tags }}-${{ github.event.inputs.tag || github.event.release.tag_name || 'latest' }} labels: ${{ steps.meta-alpine.outputs.labels }} + - name: Trigger new LiteLLM Release + uses: actions/github-script@v7 + with: + script: | + const { data: workflows } = await octokit.actions.listRepoWorkflows({ + owner: context.repo.owner, + repo: context.repo.repo + }); + + const workflowB = workflows.workflows.find(workflow => workflow.name === 'Release'); + + if (workflowB) { + await octokit.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: workflowB.id, + ref: 'main' // Set the branch as needed + }); + } else { + throw new Error('Workflow B not found'); + } + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}