Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

A GitHub Action that deploys an existing deploy request of your PlanetScale database

License

Notifications You must be signed in to change notification settings

planetscale/deploy-deploy-request-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ ⚠️

This Action has been replaced by setup-pscale-action. Which is even faster! Please see an example here.

⚠️ ⚠️

Deploy Deploy Request Action

This GitHub Action can be used within your workflows to deploy an open deploy request for your PlanetScale database.

Prerequisites

Before you can use this Action, you'll need to configure a service token that has permission to create branches on your database. Refer to our docs for more details on how to create a service token. Once the service token has been created, the following repository secrets must be set:

  • PLANETSCALE_SERVICE_TOKEN_ID
  • PLANETSCALE_SERVICE_TOKEN

These values will be used to authenticate to the PlanetScale service.

Example

The following example will create a deploy request for the recipes_db database when a pull request is closed.

name: Deploy a deploy request
on:
  pull_request:
    types: [closed]

jobs:
  deploy_deploy_request:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v3
      - name: Deploy a deploy request
        uses: planetscale/deploy-deploy-request-action@v4
        with:
          org_name: bmorrison-ps
          database_name: recipes_db
          number: 123
        env:
          PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }}
          PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}

Input variables

Required

  • org_name - The name of the PlanetScale organization.
  • database_name - The name of the database to create the branch on.

Optional

  • number - The number of the deploy request to deploy. Defaults to the latest deploy request.
  • wait - If set to true, this action will wait for the deploy request to merge before exiting.

About

A GitHub Action that deploys an existing deploy request of your PlanetScale database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •