CloudSQL Proxy for Github Actions
ActionsTags
(2)Github Action which will start a Google Cloud SQL Proxy as a Docker container.
Forked from mattes/gce-cloudsql-proxy-action to support Cloud SQL Auth proxy v2 & add a few small improvements.
- A running Cloud SQL instance with a public IP address
- Create a new Service Account (Recommended: dedicated for this purpose) with the
Cloud SQL ClientRole - Generate a JSON Key for this Service Account:
- Go to the API & Services - Credentials page
- Under
Service Accounts, click on the Service Account you created - Go to the
Keystab ->Add Key->Create new key - Select
JSONand clickCreate-> Save the file
- Add the content of the JSON Key file as a new Secret in your Github repository
- Go to the
Settingstab of your repository - Click on
Secrets->Actions->New repository secret - Give it a name (i.e.:
CLOUD_SQL_CREDENTIALS), and paste the content of the JSON Key file as the value
- Go to the
| Variable | Description |
|---|---|
creds |
Required Service Account JSON Key (not base64 encoded) |
instance |
Required Cloud SQL connection name |
port |
Listen on port, default: 5432 |
proxy_version |
Cloud SQL Proxy version, default: 2.20.0 |
startup_attempts |
Number of attempts to wait for the proxy to start, default: 10 |
uses: saleskick-com/cloudsql-proxy-action@v1
with:
creds: ${{ secrets.CLOUD_SQL_CREDENTIALS }}
instance: my-project:us-central1:instance-1
All users of this project must agree to the terms and conditions outlined in the EULA before using the software.
This project is licensed under the Unlicense.
CloudSQL Proxy for Github Actions is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.