Add force_release input to workflow_dispatch

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-04-04 03:00:20 -03:00
commit e081b985c4
3 changed files with 26 additions and 16 deletions

View file

@ -9,13 +9,18 @@ on:
paths: paths:
- "pyproject.toml" - "pyproject.toml"
workflow_dispatch: workflow_dispatch:
inputs:
force_release:
description: "Force a release"
required: false
default: "false"
env: env:
POETRY_VERSION: "1.8.2" POETRY_VERSION: "1.8.2"
jobs: jobs:
if_release: if_release:
if: ${{ (github.event.pull_request.merged == true) && contains(github.event.pull_request.labels.*.name, 'pre-release') }} if: ${{ (github.event.pull_request.merged == true) && contains(github.event.pull_request.labels.*.name, 'pre-release') }} || ${{ github.event_name == 'workflow_dispatch' && inputs.force_release == 'true' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -9,6 +9,11 @@ on:
paths: paths:
- "pyproject.toml" - "pyproject.toml"
workflow_dispatch: workflow_dispatch:
inputs:
force_release:
description: "Force a release"
required: false
default: "false"
workflow_run: workflow_run:
workflows: ["pre-release-base"] workflows: ["pre-release-base"]
types: [completed] types: [completed]
@ -19,7 +24,7 @@ env:
jobs: jobs:
if_release: if_release:
if: ${{ (github.event.pull_request.merged == true) && contains(github.event.pull_request.labels.*.name, 'pre-release') }} if: ${{ (github.event.pull_request.merged == true) && contains(github.event.pull_request.labels.*.name, 'pre-release') }} || ${{ github.event_name == 'workflow_dispatch' && inputs.force_release == 'true' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -101,20 +101,20 @@ module.exports = {
"components/tools", "components/tools",
], ],
}, },
{ // {
type: "category", // type: "category",
label: "Examples", // label: "Examples",
collapsed: false, // collapsed: false,
items: [ // items: [
// "examples/flow-runner", // // "examples/flow-runner",
// "examples/conversation-chain", // // "examples/conversation-chain",
// "examples/buffer-memory", // // "examples/buffer-memory",
// "examples/csv-loader", // // "examples/csv-loader",
// "examples/searchapi-tool", // // "examples/searchapi-tool",
// "examples/serp-api-tool", // // "examples/serp-api-tool",
// "examples/python-function", // // "examples/python-function",
], // ],
}, // },
{ {
type: "category", type: "category",
label: "Deployment", label: "Deployment",