Home > Enterprise >  GithubActions use private docker image on service
GithubActions use private docker image on service

Time:11-28

I'm using the github-actions to create a quite real integration test environment. I have some micro-services to run up in order to let system make calls to them. Every micro-service runs in a docker image that expone a port.

My idea is to run all micro-services that the project under test needs in GithubActions services and let it use as a common service (such as postgres or redis).

However my docker image is saved in a private google artifact registry so I need an authentication to allow the GithubAction service to download it.

Have you got an idea to do it?

Inside the steps part I use this snippet to auth to GCP but I can't apply it to services :

uses: 'google-github-actions/auth@v0'
with:
  credentials_json: '${{ secrets.GCP_PREPROD_SA_KEY }}'

Can you help me? Do you think is something possible? If not any suggestion on which is the best solution?

UPDATE :

As it is written I don't want to auth inside a JOB but inside a SERVICE. So the first answer is not correct, in attached the result .

Error after first suggestion

CodePudding user response:

The short answer is no, is not possible to add auth on services.

I'll use docker-compose after normal login action with, in my case GCP Registry...

  • Related