value for inputs through Github UI for caller workflows #129096
-
Github ActionsHow to inject values to inputs from Github UI instead of BodyMy current re-usable workflow is something like this. callable.yaml name: Called Workflow
on:
workflow_call:
inputs:
env:
type: string
description: 'environment'
default: 'dev'
required: true
jobs:
echo:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./
steps:
- name: echo environment
run: |
echo ${{ inputs.env }} caller.yaml name: Build/Deploy
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
packages: read
jobs:
caller-workflow:
uses: org/repo/.github/workflows/callable.yaml
secrets: inherit
with:
env: dev but I want to use UI inputs from my caller workflow instead of can I use something like this and pass inputs through UI. on:
workflow_dispatch:
inputs:
environment:
type: choice
required: true
default: 'qa'
options:
- qa
- dev |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
After some research I found it can help me this way. on:
workflow_dispatch:
inputs:
environment:
type: choice
required: true
default: 'qa'
options:
- qa
- dev
permissions:
id-token: write
contents: read
packages: read
jobs:
caller-workflow:
uses: org/repo/.github/workflows/callable.yaml@main
secrets: inherit
with:
env: ${{ github.event.inputs.environment }} |
Beta Was this translation helpful? Give feedback.
-
on: permissions: jobs: |
Beta Was this translation helpful? Give feedback.
-
0562958529 |
Beta Was this translation helpful? Give feedback.
After some research I found it can help me this way.