Skip to content

thompsonja/docker-pull-gcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-pull-gcr

GitHub Workflow Action to pull Docker images from Google Container Registry (GCR)

Required Inputs:

  • image: The Docker image and tag, like "image:latest"

Optional Inputs:

  • gcr_location: multi-region location to upload the Docker image to. Defaults to gcr.io. Read more here

Required Environment Variables:

  • GCLOUD_SERVICE_ACCOUNT_KEY: The service account key needed to pull from GCR. It is recommended that this account should only have the minimum access needed to push an image to GCR. Read more here
  • GOOGLE_PROJECT_ID: The project ID associated with the Google Cloud Project. To find your project ID, follow instructions here. If this is not specified, the service account key will be parsed to obtain it.

Examples

Simple example:

uses: thompsonja/[email protected]
with:
  image: "foo_image:latest"
  env:
    GCLOUD_SERVICE_ACCOUNT_KEY: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_KEY }}
    GOOGLE_PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }}

Example pulling an image from EU servers:

uses: thompsonja/[email protected]
with:
  gcr_location: "eu.gcr.io"
  image: "foo_image:latest"
  env:
    GCLOUD_SERVICE_ACCOUNT_KEY: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_KEY }}
    GOOGLE_PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID }}

About

GitHub Action for pulling Docker images from GCR

Resources

Stars

Watchers

Forks

Packages

No packages published