Retrieve environment variable within building action

Hello, 

I’m building a custom action based on Dockerfile and i would like to pass  all the environment variables received to  my container build-in action

name: My new step
      uses: build-action@0.0.1
      env:
        SLACK_WEBHOOK_URL: ${{secrets.SLACK_WEBHOOK_URL}}
        DYNAMIC_VAR: %{{secrets.DYNAMIC_VAR}}
      with:
        path: ./${{ matrix.example_folder }}

The build-in action looks like :

runs:
  using: 'docker'
  image: 'Dockerfile'
  args:
    - run
    - ${{ inputs.path }}

How can i get the Env Var SLACK_WEBHOOK_URL, DYNAMIC_VAR and others into my running action container without using defined inputs.

Thank you for your support.

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