Skip to content

Retrieve environment variable within building action #26984

Answered by Yanjingzhu
olivierodo asked this question in Actions
Discussion options

You must be logged in to vote

Hi @olivierodo , 

The step env will be added to the action docker container environment variable , you could just use 

$SLACK_WEBHOOK_URL and $DYNAMIC_VAR to get the value in entrypoint.sh

My example entrypoint.sh:

#!/bin/sh -l

echo "Hello $1"
time=$(date)
echo ::set-output name=time::$time
echo $SLACK_WEBHOOK_URL
echo $DYNAMIC_VAR

Replies: 1 comment

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
2 participants