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