https://github.com/elgohr/gcloud-login-action
A Github Action which can be used to authenticate with Google Cloud Container Registry
https://github.com/elgohr/gcloud-login-action
actions container-registry gcloud github-actions publishing
Last synced: 8 months ago
JSON representation
A Github Action which can be used to authenticate with Google Cloud Container Registry
- Host: GitHub
- URL: https://github.com/elgohr/gcloud-login-action
- Owner: elgohr
- License: mit
- Created: 2019-11-29T13:35:16.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-08-11T19:51:12.000Z (10 months ago)
- Last Synced: 2025-09-13T13:29:50.625Z (9 months ago)
- Topics: actions, container-registry, gcloud, github-actions, publishing
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 23
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gcloud-Container-Registry-Login-Action
[](https://github.com/elgohr/gcloud-login-action/actions)
This Action for Docker logs into [Google Cloud Container Registry](https://cloud.google.com/container-registry/) and gets the timely bound credentials for Docker.
## Usage
## Example pipeline
```yaml
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