1

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/
asked Oct 31, 2021 at 11:46
4
  • Could you add more details to your question such as the workflow .yml implementation please? Otherwise it will be hard to reproduce what happened. Commented Oct 31, 2021 at 12:31
  • What do you mean by the 'implementation'? the yml code? Commented Oct 31, 2021 at 14:30
  • Yes, the workflow file. Commented Oct 31, 2021 at 16:49
  • edited the post with the yml Commented Oct 31, 2021 at 17:23

1 Answer 1

2

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.

GitHub Docs

answered Oct 31, 2021 at 20:11
Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.