Skip to content

Github Actions args not honoring variables #26126

Discussion options

You must be logged in to vote

Okay, I solved this. It looks like secrets are not passed at all through arguments. They are only exposed as environment variables. So to use my secrets, I had to slurp them in the bash script not pass them as arguments to the script from actions. For those who come after me and beat their head against the wall, this is what I did per secret

#!/bin/bash

PASS=printf '%s\n' "${PASS}"
SLACK_TOKEN=printf '%s\n' "${TOKEN}"

doing_something_username password $PASS

post_in_slack $TOKEN

Replies: 6 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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants