setup-pscale-action icon indicating copy to clipboard operation
setup-pscale-action copied to clipboard

Setup the PlanetScale CLI for GitHub Actions

PlanetScale CLI for GitHub Actions

Use this Action to install pscale on your actions runner. Works with Linux, Mac and Windows runners.

- name: Setup pscale
  uses: planetscale/setup-pscale-action@v1
- name: Use pscale
  env:
    PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }}
    PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
  run: |
    pscale deploy-request list my-db --org my-org

Be sure to setup a service token with the proper permissions and add it to your repositories secrets.

Example with version pinned:

Setting the version is optional. When omitted, the action will download the latest version. See full list of releases.

- name: Setup pscale
  uses: planetscale/setup-pscale-action@v1
  with:
    version: v0.183.0

Examples

See our PlanetScale + GitHub Actions doc for ideas on how to use pscale in your Actions Workflows.

Development

Install the dependencies

$ npm install

Build the typescript and package it for distribution

$ npm run build && npm run package

License

The action is available as open source under the terms of the Apache 2.0 License.