Using github secrets in another non-workflow yaml file

Viewed 140

Is it possible to access a github secret in a yaml file that's not a workflow or an action yaml file?

For example, I've saved in github the environment secret INFURA_RINKEBY_WSS and I attempt to access it in the following yaml config file for my program.

type: EndpointList
endpoints:
- type: RPCEndpoint
  chain_id: 1
  network: rinkeby
  provider: Infura
  url: ${{ secrets.INFURA_RINKEBY_WSS}}
  explorer: https://etherscan.io

However, the INFURA_RINKEBY_WSS environment variable I've set in github isn't accessed yet by my yaml config file.

The following is my main.yaml github workflow:

name: Report to eth/usd on rinkeby w/ pytelliot

on: push
    
jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.9"]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install telliot-feed-examples
        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
    - name: Move pre-made pytelliot configs to home directory
      run: |
        cp -r ./config ~/
    - name: report :)
      run: telliot-examples --legacy-id 1 report --submit-once
      env:
        PK: ${{ secrets.PK }}
        INFURA_RINKEBY_WSS: ${{ secrets.INFURA_RINKEBY_WSS }}

Thanks!

0 Answers
Related