Skip to content

Commit 9b03299

Browse files
authored
feat: introduce general "branch" input (#8)
1 parent f52a57e commit 9b03299

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

action.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ branding:
88
inputs:
99
project_id:
1010
required: true
11+
description: "The Neon project id"
1112
type: string
1213
branch_id:
13-
required: true
1414
type: string
15+
deprecationMessage: "The `branch_id` input is deprecated in favor of `branch`"
1516
api_key:
17+
description: "The Neon API key, read more at https://neon.tech/docs/manage/api-keys"
1618
required: true
19+
type: string
20+
branch:
21+
description: "The Neon branch name or id"
22+
type: string
1723

1824
runs:
1925
using: "composite"
@@ -26,4 +32,8 @@ runs:
2632
env:
2733
NEON_API_KEY: ${{ inputs.api_key }}
2834
run: |
29-
yarn neonctl branches delete ${{ inputs.branch_id }} --project-id ${{ inputs.project_id }}
35+
if [ -z "${{ inputs.branch }}" ]; then
36+
yarn -s run neonctl branches delete ${{ inputs.branch_id }} --project-id ${{ inputs.project_id }}
37+
else
38+
yarn -s run neonctl branches delete ${{ inputs.branch }} --project-id ${{ inputs.project_id }}
39+
fi

0 commit comments

Comments
 (0)