title: How to pass secrets from GitHub Actions to python environ variables?
body: <p>To run <code>pytest</code> within GitHub Actions, I have to pass some <code>secrets</code> for Python running environ.
  e.g.,</p>
  <pre><code>  - name: Test env vars for python
      run: python -c 'import os;print(os.environ)'
      env:
        TEST_ENV: 'hello world'
        TEST_SECRET: ${{ secrets.MY_TOKEN }}
  </code></pre>
  <p>However, the output is as follows,</p>
  <pre><code>environ({
  'TEST_ENV': 'hello world',
  'TEST_SECRET':'',
  ...})
  </code></pre>
  <p>It seems not working due to <a href="https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-secrets" rel="nofollow noreferrer">GitHub's redaction</a>.</p>
  <p>Based on @raspiduino 's answer, I did more explore on both options to import env vars.</p>
  <pre><code>name: python
  
  on: push
  
  jobs:
    test_env:
      runs-on: ubuntu-latest
      steps:
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.8
          
      - name: Test env vars for python
        run: python -c 'import os;print(os.environ)'
        env:
          ENV_SECRET: ${{ secrets.ENV_SECRET }} 
          REPO_SECRET: ${{ secrets.REPO_SECRET }} 
      
      - name: Test inline env vars for python
        run: ENV_SECRET=${{ secrets.ENV_SECRET }} REPO_SECRET=${{ secrets.REPO_SECRET }} python -c 'import os;print(os.environ)'
  
  </code></pre>
  <p>Basically, both steps are in same outputs. The <code>REPO_SECRET</code> can be passed thru but not the <code>ENV_SECRET</code>.</p>
  <p><a href="https://i.stack.imgur.com/Q9CbS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q9CbS.png" alt="enter image description here" /></a></p>
  <p>Outputs
  <a href="https://i.stack.imgur.com/gjLYJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gjLYJ.png" alt="enter image description here" /></a></p>