Skip to content

dymaxionlabs/gce-cloudsql-proxy-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Google Cloud SQL Proxy

Github action which will start a Google Cloud SQL Proxy.

Prerequisites

Set up the following resources manually in the Cloud Console or use a tool like Terraform.

  • Running Cloud SQL instance with a public IP address
  • Create Service Account with Role Cloud SQL Client and do authentication via Workload Identity Federation

Github Action Inputs

Variable Description
instance Required Cloud SQL connection name
port Listen on port, default 5432
version Cloud SQL Proxy version, default latest

Example Usage

jobs:
  job_id:
    # ...

    # Add "id-token" with the intended permissions.
    permissions:
      contents: 'read'
      id-token: 'write'

    steps:
    - uses: 'actions/checkout@v3'

    - id: 'auth'
      name: 'Authenticate to Google Cloud'
      uses: 'google-github-actions/auth@v0'
      with:
        workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
        service_account: '[email protected]'

    - uses: dymaxionlabs/gce-cloudsql-proxy-action@v2
      with:
        instance: my-project:us-central1:instance-1

About

Github action which will start a Google Cloud SQL Proxy as Docker container

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%