我有一个工作流程,workflow_dispatch输入默认为空字符串。该工作流程使用本地 github 操作,其自定义输入及其各自的默认值:
# .github/workflow/ci.yml
on:
push:
- main
- wip/**
workflow_dispatch:
inputs:
myInput:
description: An input string
type: string
jobs:
myJob:
steps:
- name: My action step
uses: ./.github/actions/my-action
with:
myInput: ${{ github.event.inputs.myInput }}
Run Code Online (Sandbox Code Playgroud)
# .github/actions/my-action/action.yml
name: 'My action'
description: 'An action'
inputs:
myInput:
description: An input
required: false
default: 'My default input'
runs:
steps:
- name: Run
shell: bash
run: echo Input: ${{ inputs.myInput }}
Run Code Online (Sandbox Code Playgroud)
如果工作流程是由推送触发的,或者如果我使用空输入手动启动工作流程,我希望该操作my-action保留其默认输入值My default input而不是空字符串。
您知道这是否可以从工作流程中实现,而无需调整my-action操作吗?
我正在使用 C/C++ 和 Python 中的多个库和包建立一个项目。
I would like to setup a binary repository for C/C++ packages and a python package index server for python packages.
I stumbled upon conan and artefactory to handle inter C/C++ libraries dependencies but I can't find a clear solution to add standard python package dependencies.
For instance, my project 'A' (C/C++) depends on 'B' (C/C++) that contains code generated using 'C' tool (Python).
I would like to set a …