diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 1ab28710f..566dd4f2f 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -19,6 +19,11 @@ on: - reopened - synchronize merge_group: + workflow_dispatch: + inputs: + branch_name: + description: 'Branch name' + required: true jobs: test-job: @@ -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' }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 52804657b..9dda50884 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 }}