We have a specific branch in a specific repository that doesn't get all the secrets in the workflow action.
I.e., some of the secrets seem empty even though they are all defined as organization secrets available to all repositories within the organization.
all these env. vars are derived directly from secrets ${{ secrets.XXX }}
As you can see in the screenshot, some were empty and some not. Despite all of them being set the same.
I even tried setting those secrets on the specific repo but still they are empty.
*** EDIT ***
Here is the relevant part of the workflow file:
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
name: build
runs-on: ubuntu-latest
env:
REACT_APP_AWS_REGION: ${{ secrets.REGION }}
REACT_APP_AWS_ACCESS_KEY_ID: ${{ secrets.KEY_ID }}
REACT_APP_AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET }}
REACT_APP_AWS_BUCKET: ${{ secrets.BUCKET }}
REACT_APP_COGNITO_REGION: ${{ secrets.REGION }}
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install
- run: yarn run build
- uses: actions/upload-artifact@v2
with:
name: build
path: build/
-
Could you add more details to your question such as the workflow .yml implementation please? Otherwise it will be hard to reproduce what happened.GuiFalourd– GuiFalourd2021年10月31日 12:31:42 +00:00Commented Oct 31, 2021 at 12:31
-
What do you mean by the 'implementation'? the yml code?giladrv– giladrv2021年10月31日 14:30:58 +00:00Commented Oct 31, 2021 at 14:30
-
Yes, the workflow file.GuiFalourd– GuiFalourd2021年10月31日 16:49:00 +00:00Commented Oct 31, 2021 at 16:49
-
edited the post with the ymlgiladrv– giladrv2021年10月31日 17:23:48 +00:00Commented Oct 31, 2021 at 17:23
1 Answer 1
It turns out that it was all because of a limit on the number of secrets on GitHub. Apparently, only the first 100 organization secrets are carried over to the repositories, so some of the environment variables which were based on the last (alphabetically-ordered) secrets became empty.
To overcome the issue temporarily I deleted some unused secrets to get below 100 organization secrets, and the deploy works normally again.