Skip to content

When I invoke an action I wrote with an input, the input doesn't seem to be visible to the action #26063

Answered by weide-zhou
mbestavros asked this question in Actions
Discussion options

You must be logged in to vote

Hi @mbestavros,

In action.yaml, you can use ‘set-env’ to add ${{ inputs.allowed_features }} to env context, then you can get it from the shell.

    - run: echo "::set-env name=INPUT_ALLOWED_FEATURES::${{ inputs.allowed_features }}"
      shell: bash

I forked your action repo and confirmed it works(comment some shell script), please check it for your reference.

github.com

weide-zhou/nightly-features/blob/3d5ebb298f664b66a0c6a7e9264229397d0f264b/action.yml

name: nightly-features
description: Test enabled Rust nightly features against an allowlist

branding:
icon: zap
color: gray-dark

inputs:
allowed_features:
description: 'Allowed Rust nightly features. Provide a comma-separated list. For …

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants