usage of github organization secret in a github workflow

Viewed 5338

I want to use an github organization secret in my github action workflow but cannot get it working.

Github released that new feature on May 14th (https://github.blog/changelog/2020-05-14-organization-secrets/). Of course I read the documentation and added a new organization wide secret ( on https://github.com/organizations/(myOrganization)/settings/secrets ). The secret "Repository access" is set to "private repositories".

I used the same secret name which I used in 4 private repositories before. The workflows of those repositories use the secret in that way:

- uses: actions-hub/gcloud@master
        env:
          PROJECT_ID: ${{ env.ARTIFACT_PROJECT }}
          APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
          CLI: gsutil
        with:
          args: cp ....

The access via ${{secrets.GOOGLE_CREDENTIALS}} works when I "override" the organization secret in every project (which was the case before the organization secret feature was released).

When I remove the project secret, the secret is not there and yield an empty value.

Does anyone had the same issue and knows how to solve that?

1 Answers

I had the same problem while using the free plan.

I cant find the doc, but it states under https://github.com/organizations/yourFreeOrganization/settings/secrets that Organization secrets cannot be used by private repositories with your plan.

But then again, if you had a free plan you wouldn't even have the option to create a new secret shared only by private repositories anyway

Related