Coder Social home page Coder Social logo

action-auth-artifact-registry's Introduction

This authenticates to Google Cloud and then Google Artifact Registry.

What it does

  • Auth to Google Cloud (getting an access token)
  • Auth to Google Artifact Registry (us-docker.pkg.dev)
  • Enable PyPI on Google Artifact Registry by installing an appropriate keyring via pip
    • This does not integrate with poetry if you are using pipx. For that you can
      • Manually run poetry self add keyrings.google-artifactregistry-auth
      • PR an extra input to this action (or ask @miker985 to do it)

How to use it

      - name: Auth to Google
        uses: 'uwit-iam/action-auth-artifact-registry@main'
        with:
          credentials: "${{ secrets.MCI_GCLOUD_AUTH_JSON }}"
          # REQUIRED if you want private GAR container registry access
          enable_private_docker: true
          # REQUIRED if you want private GAR PyPI access
          enable_private_pypi: true

Outputs

These outputs are all provided by the underling google-github-actions/auth action's outputs

  • project_id: Provided or extracted value for the Google Cloud project ID.
  • credentials_file_path: Path on the local filesystem where the generated credentials file resides.
  • auth_token: The Google Cloud federated token (for Workload Identity Federation) or self-signed JWT (for a Service Account Key JSON).
  • access_token: The Google Cloud access token for calling other Google Cloud APIs.

Other important information

Enabling the private PyPI repo involves installing a Python package. This will be installed via pip.

Users of this action should pre-configure the runner as appropriate prior to calling this.

Likely that means calling e.g., actions/setup-python to set the correct default Python version

      - uses: actions/setup-python@v5
        with:
          # auto-detect Python version from file; alternatively you can set to explicit version if desired
          python-version-file: pyproject.toml

action-auth-artifact-registry's People

Contributors

miker985 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.