run the Google Cloud SQL Proxy in a GitHub Action's context
- Running Cloud SQL instance with a public IP address
- Service Account with Role
Cloud SQL Client
on:
push:
branches: [ master ]
jobs:
db-migrate:
runs-on: ubuntu-latest
steps:
- uses: ahmadnassri/action-google-cloud-sql-proxy@v1
with:
key: ${{ secrets.cloud-sql-json-key }}
connection: my-project:northamerica-northeast1:database
port: 5432
input | required | default | description |
---|---|---|---|
key | x | - |
Service Account JSON Key |
token | x | - |
Service Account OIDC token (if using OIDC authn) |
connection | ✓ | - |
Cloud SQL connection name |
port | ✓ | - |
Listening port (MySQL: 3306, PostgreSQL: 5432, SQL Server: 1433) |
version | ✗ | 1.22.0-alpine |
Cloud SQL Proxy Version |
sleep | ✗ | 3 |
time between connection checks |
attempts | x | 10 |
number of total connection checks |
Note: One of key
or token
is required for authentication.
Author: Ahmad Nassri • Twitter: @AhmadNassri