Skip to content

neondatabase/delete-branch-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

27 Commits
 
 
 
 

Repository files navigation

Delete a Neon Branch 🚀

This GitHub action deletes a new Neon branch.

Here is an example of how to use it:

name: Delete Neon Branch with GitHub Actions Demo
run-name: Delete a Neon Branch 🚀
on: [push]
jobs:
  delete-neon-branch:
    steps:
      uses: neondatabase/delete-branch-action@v3
      with:
        project_id: rapid-haze-373089
        branch: br-long-forest-224191
        api_key: ${{ secrets.NEON_API_KEY }}

How to set up the NEON_API_KEY

Navigate to you the Account page on your Neon console. In the Developer Settings, Generate a new API key if you don't have one already. It's important not to share the API key or expose it in your actions or code. This is why you need to add the API key to a new GitHub secret.

In your GitHub repo, go to Settings and locate Secrets at the bottom of the left sidebar. Click on Actions and then on the New repository secret button to create a new secret. Name the secret NEON_API_KEY and paste the API key generated on the Neon console in the Secret* field, then press Add secret button.