When I do
${{ secrets.MY_SECRET }}
it returns empty string,
I am the person committing the changes and its my repository so there should be no issue regarding authorization of secrets, and also cloned it not fork,
this is how my actions job looks like
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
- name: Download Modules
run: npm ci
- name: Test
env:
TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEST_SECRET: ${{ secrets.TEST_SECRET }}
run: |
echo ${#TEST_GITHUB_TOKEN}
echo ${#TEST_SECRET}
- name: React Build
run: npm run build
env:
CI: true
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_PIXABAY_API_KEY: ${{ secrets.REACT_APP_PIXABAY_API_KEY }}
REACT_APP_TEST: 'TESTING'
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.3
with:
name: docs
path: './build'
the TEST_GITHUB_TOKEN returns 40
and TEST_SECRET returns 0
and the REACT_APP_TEST environment variable is working as expected, it means the secrets is the thing that is not being passed