I feel like this is a really stupid question but can't seem to figure it out. I have set up a really simple node.js project with a API_KEY as a secret.
In the nodejs action yml I have the following:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
env:
API_KEY: ${{ secrets.API_KEY }}
- run: export
- run: npm ci
- run: npm run build --if-present
- run: npm test
API_KEY doesn't show in export as I would expect it to nor does it show when I console.log(process.env).
According to the documentation, this should work as-is. I feel like I'm missing something really simple.
This is not a fork as suggested in this stackoverflow question.
What am I missing to get the API_KEY available in my node script?