(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
This commit is contained in:
Diego Imbert
2026-01-24 20:34:51 +01:00
committed by GitHub
parent 05fa3cd013
commit 05f5ef9cd9

View File

@@ -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);