Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AjitPadhi-Microsoft committed Dec 5, 2024
1 parent 807d17c commit b024163
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ on:
- reopened
- synchronize
merge_group:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch name'
required: true

jobs:
test-job:
Expand All @@ -30,6 +35,7 @@ jobs:
ref: ${{ github.event.workflow_run.head_branch }}
- run: git branch
- run: env
- run: echo "branch.....${{github.event.inputs.branch_name}}""

docker-build:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,19 @@ jobs:
run: make unittest-frontend
- name: Lint
run: make lint
- name: Trigger Build Docker Images Workflow
uses: actions/github-script@v7
with:
script: |
const response = await github.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build-docker-images.yml',
ref: github.ref,
inputs: {
branch_name: github.ref.replace('refs/heads/', '')
}
});
console.log(response);
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b024163

Please sign in to comment.