admin管理员组文章数量:1356965
I am trying to do something very simple: passing a value into a reusable workflow input. I've done this before and it is still working in this very same repo. But whatever new input I add to any workflow, I cannot get any value passed into it.
The reusable workflow has:
on:
workflow_call:
inputs:
branch-to-build:
# do not use branch as name as it will be master in a scheduled run
type: string
description: 'Branch to checkout, build and publish'
required: false
default: 'dev'
tag-to-apply:
type: string
description: 'Tag to apply to the images'
required: false
default: 'nightly-dev'
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.inputs.branch-to-build }}
And then the calling workflow has:
jobs:
nightly-build-dev:
uses: ./.github/workflows/reusable.yml
with:
branch-to-build: 'dev'
tag-to-apply: 'nightly-dev'
secrets: inherit
Now when I kick-off the calling workflow via the GitHub UI, the branch-to-build value is always empty instead of 'dev' which is provided (or 'dev' which is also the default).
What am I missing? I must be overlooking something. Using inputs.branch-to-build
doesn't help.
Opper
I am trying to do something very simple: passing a value into a reusable workflow input. I've done this before and it is still working in this very same repo. But whatever new input I add to any workflow, I cannot get any value passed into it.
The reusable workflow has:
on:
workflow_call:
inputs:
branch-to-build:
# do not use branch as name as it will be master in a scheduled run
type: string
description: 'Branch to checkout, build and publish'
required: false
default: 'dev'
tag-to-apply:
type: string
description: 'Tag to apply to the images'
required: false
default: 'nightly-dev'
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.inputs.branch-to-build }}
And then the calling workflow has:
jobs:
nightly-build-dev:
uses: ./.github/workflows/reusable.yml
with:
branch-to-build: 'dev'
tag-to-apply: 'nightly-dev'
secrets: inherit
Now when I kick-off the calling workflow via the GitHub UI, the branch-to-build value is always empty instead of 'dev' which is provided (or 'dev' which is also the default).
What am I missing? I must be overlooking something. Using inputs.branch-to-build
doesn't help.
Opper
Share Improve this question asked Mar 30 at 21:51 VaalVaal 6927 silver badges12 bronze badges1 Answer
Reset to default 0So the day after it just works with input.branch-to-build
本文标签: inputs in reusable github action workflow are always emptyStack Overflow
版权声明:本文标题:inputs in reusable github action workflow are always empty - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743973309a2570777.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论