Skip to content

A Github Action which can be used to authenticate with Google Cloud Container Registry

License

Notifications You must be signed in to change notification settings

elgohr/gcloud-login-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcloud-Container-Registry-Login-Action

Actions Status

This Action for Docker logs into Google Cloud Container Registry and gets the timely bound credentials for Docker.

Usage

Example pipeline

name: Publish Docker
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Login to gcloud registry
      id: gcloud
      uses: elgohr/gcloud-login-action@v2
      with:
        account_key: ${{ secrets.GCLOUD_KEY }}
    - name: Publish to Registry
      uses: elgohr/Publish-Docker-Github-Action@v5
      with:
        name: myDocker/repository
        username: ${{ env.username }}
        password: ${{ env.password }}
        registry: gcr.io, us.gcr.io, eu.gcr.io or asia.gcr.io

Mandatory arguments

account_key Base64 encoded service account key exported as JSON

Outputs

username the username for logging in
password the password for logging in