Skip to content

Commit ea88da7

Browse files
fix: action yaml
Signed-off-by: Henry Gressmann <[email protected]>
1 parent ea3c18d commit ea88da7

File tree

3 files changed

+61
-41
lines changed

3 files changed

+61
-41
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Download, install and setup the Nots.dev CLI.
55
## Usage
66

77
```yaml
8-
- uses: nots-dev/action@v1
8+
- uses: nots-dev/setup-nots-cli@v0
99
with:
1010
deploy-token: ${{ secrets.NOTS_TOKEN }}
1111
server: https://nots.dev

action.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

action.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Setup Nots.dev
2+
description: Download, install, and setup the Nots.dev CLI.
3+
author: explodingcamera
4+
branding:
5+
icon: play-circle
6+
color: white
7+
inputs:
8+
version:
9+
description: 'The version of Nots to install. (e.g. latest, "0.1.5")'
10+
required: false
11+
deploy-token:
12+
required: false
13+
description: "Optional deploy token for authenticating against remote nots.dev server."
14+
server:
15+
required: false
16+
description: "Server to connect to"
17+
outputs:
18+
nots-version:
19+
description: The version of Nots that was installed.
20+
nots-path:
21+
description: The path to the Nots CLI.
22+
runs:
23+
using: "composite"
24+
steps:
25+
- name: Download Nots
26+
shell: bash
27+
run: |
28+
set -o pipefail
29+
curl -fsSLO https://raw.githubusercontent.com/nots-dev/www/main/docs/install.sh || {
30+
echo "Failed to download installer"
31+
exit 1
32+
}
33+
34+
chmod +x install.sh
35+
./install.sh ${{ inputs.version }} || {
36+
echo "Failed to install Nots"
37+
exit 1
38+
}
39+
rm install.sh
40+
41+
PATH="${HOME}/.local/bin:${PATH}"
42+
if ! command -v nots &> /dev/null; then
43+
echo "Nots command not found after installation"
44+
exit 1
45+
fi
46+
47+
version=$(nots --version | cut -d' ' -f2)
48+
if [[ -z "$version" ]]; then
49+
echo "Failed to get Nots version"
50+
exit 1
51+
fi
52+
53+
echo "${HOME}/.local/bin" >> $GITHUB_PATH
54+
echo "nots-version=${version}" >> $GITHUB_OUTPUT
55+
echo "nots-path=${HOME}/.local/bin/nots" >> $GITHUB_OUTPUT
56+
# - name: Login to Nots
57+
# if: ${{ inputs.deploy-token }}
58+
# shell: bash
59+
# run: |
60+
# nots login --token ${{ inputs.deploy-token }} --server ${{ inputs.server }}

0 commit comments

Comments
 (0)