From 05f5ef9cd9b91ec00f9e08b4eecb76239a9213a9 Mon Sep 17 00:00:00 2001 From: Diego Imbert <70353967+diegoimbert@users.noreply.github.com> Date: Sat, 24 Jan 2026 20:34:51 +0100 Subject: [PATCH] (CI requires to be on main to be tested) use windmill flow for ephemeral backend action 2 (#7675) * use windmill flow for ephemeral backend action * fix * nits * nit --- .github/workflows/spawn-ephemeral-backend.yml | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/spawn-ephemeral-backend.yml b/.github/workflows/spawn-ephemeral-backend.yml index 48ae653a4e..bfc57639de 100644 --- a/.github/workflows/spawn-ephemeral-backend.yml +++ b/.github/workflows/spawn-ephemeral-backend.yml @@ -3,33 +3,38 @@ name: Spawn Ephemeral Backend on: issue_comment: types: [created] + workflow_dispatch: + inputs: + pr_number: + description: "PR number" + required: true + type: number jobs: spawn-backend: - # Only run on PR comments that contain /spawn-backend + # Only run on PR comments that contain /spawn-backend, or manual dispatch if: | - github.event.issue.pull_request && - contains(github.event.comment.body, '/spawn-backend') + github.event_name == 'workflow_dispatch' || + (github.event.issue.pull_request && contains(github.event.comment.body, '/spawn-backend')) runs-on: ubuntu-latest permissions: pull-requests: write contents: read steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Get PR details id: pr-details uses: actions/github-script@v7 with: script: | + const prNumber = context.eventName === 'workflow_dispatch' + ? context.payload.inputs.pr_number + : context.issue.number; + const pr = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, - pull_number: context.issue.number + pull_number: prNumber }); core.setOutput('commit_hash', pr.data.head.sha); core.setOutput('pr_number', context.issue.number);