Create Google cloud action with secrets

I am using the template that GitHub provided us: 

With the following syntax under .github/workflows/google.yaml

  GKE_PROJECT: ${{ secrets.GKE_PROJECT }}
  GKE_EMAIL: ${{ secrets.GKE_EMAIL }}
  GITHUB_SHA: ${{ github.sha }}
  GKE_ZONE: us-west1-a
  IMAGE: reviewsystemdocker

It always failed like this 

Run docker build -t"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \
  docker build -t"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \
    --build-arg GITHUB_SHA="$GITHUB_SHA" \
    --build-arg GITHUB_REF="$GITHUB_REF" .
  shell: /bin/bash -e {0}
    GKE_PROJECT: ***
    GKE_EMAIL: ***
    GITHUB_SHA: 10e08be3e933f742a35088e4e8b7b85c075b8d8a
    GKE_ZONE: us-west1-a
    IMAGE: reviewsystemdocker
invalid argument "***/reviewsystemdocker:10e08be3e933f742a35088e4e8b7b85c075b8d8a" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
See 'docker build --help'.
##[error]Process completed with exit code 125.

So I assum it must be something wrong with my secrets, the GitHub build system always return “***”,  I tried to base64 GKE_PROJECT, it is still failed. 

Could you please help me on it? 


1 Like

I had the same issue. I was able to fix it by upgrading my GitHub organization account. The organization repo was private, but secrets are not supported for private repos in free organization accounts.