Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing global package usage #11

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,28 @@ inputs:
project_id:
required: true
description: "The Neon project id"
type: string
branch_id:
type: string
description: "The Neon branch id"
deprecationMessage: "The `branch_id` input is deprecated in favor of `branch`"
api_key:
description: "The Neon API key, read more at https://neon.tech/docs/manage/api-keys"
required: true
type: string
branch:
description: "The Neon branch name or id"
type: string

runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
- run: yarn add global neonctl@v1
- run: yarn global add neonctl@v1
shell: bash
- name: Delete branch
shell: bash
env:
NEON_API_KEY: ${{ inputs.api_key }}
run: |
if [ -z "${{ inputs.branch }}" ]; then
yarn -s run neonctl branches delete ${{ inputs.branch_id }} --project-id ${{ inputs.project_id }}
neonctl branches delete ${{ inputs.branch_id }} --project-id ${{ inputs.project_id }}
else
yarn -s run neonctl branches delete ${{ inputs.branch }} --project-id ${{ inputs.project_id }}
neonctl branches delete ${{ inputs.branch }} --project-id ${{ inputs.project_id }}
fi