{"id":16895947,"url":"https://github.com/stevenacoffman/setup-docker-credential-gcr","last_synced_at":"2025-03-20T10:22:55.420Z","repository":{"id":220410541,"uuid":"751574856","full_name":"StevenACoffman/setup-docker-credential-gcr","owner":"StevenACoffman","description":"Github Action to Install docker-credential-gcr","archived":false,"fork":false,"pushed_at":"2025-03-11T20:57:01.000Z","size":52,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-15T05:37:49.829Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StevenACoffman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-01T21:55:17.000Z","updated_at":"2025-03-11T20:56:46.000Z","dependencies_parsed_at":"2024-02-01T23:40:10.317Z","dependency_job_id":"7582df7e-0b3c-47f1-8721-9b240a033b52","html_url":"https://github.com/StevenACoffman/setup-docker-credential-gcr","commit_stats":null,"previous_names":["stevenacoffman/setup-docker-credential-gcr"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fsetup-docker-credential-gcr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fsetup-docker-credential-gcr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fsetup-docker-credential-gcr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StevenACoffman%2Fsetup-docker-credential-gcr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StevenACoffman","download_url":"https://codeload.github.com/StevenACoffman/setup-docker-credential-gcr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244592040,"owners_count":20477835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T17:27:08.719Z","updated_at":"2025-03-20T10:22:55.414Z","avatar_url":"https://github.com/StevenACoffman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action to install and setup [docker-credential-gcr](https://github.com/GoogleCloudPlatform/docker-credential-gcr)\n\n[![Build](https://github.com/StevenACoffman/setup-docker-credential-gcr/actions/workflows/use-action.yaml/badge.svg)](https://github.com/StevenACoffman/setup-docker-credential-gcr/actions/workflows/use-action.yaml)\n\u003ca href=\"https://gcr.io\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/21046548?s=400\u0026v=4\" height=\"120\"/\u003e\u003c/a\u003e\n\nThis action will just install [docker-credential-gcr](https://github.com/GoogleCloudPlatform/docker-credential-gcr). \n\n### What is docker-credential-gcr?\n[docker-credential-gcr](https://github.com/GoogleCloudPlatform/docker-credential-gcr) [Google Container Registry](https://cloud.google.com/container-registry/)'s _standalone_, `gcloud` SDK-independent Docker credential helper. It allows for **v18.03+ Docker clients** to easily make authenticated requests to GCR's repositories (gcr.io, eu.gcr.io, etc.).\n\n**Note:** `docker-credential-gcr` is primarily intended for users wishing to authenticate with GCR in the **absence of `gcloud`**, though they are [not mutually exclusive](#gcr-credentials). For normal development setups, users are encouraged to use [`gcloud auth configure-docker`](https://cloud.google.com/sdk/gcloud/reference/auth/configure-docker), instead.\n\nThe helper implements the [Docker Credential Store](https://docs.docker.com/engine/reference/commandline/login/#/credentials-store) API, but enables more advanced authentication schemes for GCR's users. In particular, it respects [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials) and is capable of generating credentials automatically (without an explicit login operation) when running in App Engine or Compute Engine.\n\nFor even more authentication options, see GCR's documentation on [advanced authentication methods](https://cloud.google.com/container-registry/docs/advanced-authentication).\n\n\n## Example usage\n\n```yaml\nname: Publish\n\non:\n  push:\n    branches: ['main']\n\njobs:\n  publish:\n    name: Publish\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/setup-go@v4\n        with:\n          go-version: '1.20.x'\n      - uses: actions/checkout@v3\n      - uses: StevenACoffman/setup-docker-credential-gcr@v0.0.3\n      - name: 'Configure GCP Artifact Registry'\n        run: docker-credential-gcr configure-docker --registries=\"us-central1-docker.pkg.dev\"\n\n```\n\n_That's it!_ This workflow will install docker-credential-gcr so you can use ko or docker (or whatever).\n\nYou probably want to [set up Workload Identity](https://github.com/google-github-actions/auth#usage) between your GitHub Actions workflow and your GCP project.\n\n### Select `docker-credential-gcr` version to install\n\nBy default, `setup-docker-credential-gcr` installs the [latest released version of `ko`](https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases).\n\nYou can select a version with the `version` parameter:\n\n```yaml\n- uses: StevenACoffman/setup-docker-credential-gcr@v0.0.3\n  with:\n    version: v0.14.1\n```\n\nTo build and install `docker-credential-gcr` from source using `go install`, specify `version: tip`.\n\n```yaml\nsteps:\n...\n- uses: StevenACoffman/setup-docker-credential-gcr@v0.0.3\n- name: 'Configure Docker Credentials for Artifact Registry'\n  run: |\n    docker-credential-gcr configure-docker --registries=\"us-central1-docker.pkg.dev\"\n```\n\n### Why?\n\nThe `gcloud` CLI is great.\nIt's like a Swiss army knife for the cloud, if a knife could do anything to a cloud.\n\nIt does so much.\n_It does soooo much!_\n\nToo much.\n\nThis leads it to be really huge.\nHundreds of megabytes of sweet delicious Python.\nPython that has to be interpreted before it can even start running anything.\n\nIf you're downloading and installing and running `gcloud` just to execute `docker-credential-gcr configure-docker ` so you can switch to using `ko` -- _especially_ in a CI environment -- you're wasting a lot of time.\n\nInstalling `gcloud` can take _minutes_, compared to just a few seconds with `setup-docker-credential-gcr`, even if you have to build it from source.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenacoffman%2Fsetup-docker-credential-gcr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenacoffman%2Fsetup-docker-credential-gcr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenacoffman%2Fsetup-docker-credential-gcr/lists"}