-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathaction.yml
More file actions
47 lines (43 loc) · 1.33 KB
/
Copy pathaction.yml
File metadata and controls
47 lines (43 loc) · 1.33 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
name: "setup-lade"
description: "Install the lade CLI (download a pinned or latest release, verify its SHA256 checksum, and add it to PATH)."
author: "zifeo"
branding:
icon: "lock"
color: "blue"
inputs:
version:
description: 'lade version to install (without leading "v"), or "latest".'
required: false
default: "latest"
out-dir:
description: "Directory to install the lade binary into (added to PATH)."
required: false
default: "${{ github.workspace }}/.lade-bin"
runs:
using: "composite"
steps:
- name: Cache lade binary
id: cache
uses: actions/cache@v4
with:
path: ${{ inputs.out-dir }}
key: lade-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}
- name: Install lade
shell: bash
env:
LADE_VERSION: ${{ inputs.version }}
OUT_DIR: ${{ inputs.out-dir }}
run: |
set -euo pipefail
mkdir -p "$OUT_DIR"
if [ "$LADE_VERSION" = "latest" ]; then
VERSION_ENV=""
else
VERSION_ENV="${LADE_VERSION#v}"
fi
if [ ! -x "$OUT_DIR/lade" ]; then
curl -fsSL https://raw.githubusercontent.com/zifeo/lade/main/installer.sh \
| CI=1 OUT_DIR="$OUT_DIR" VERSION="$VERSION_ENV" bash
fi
echo "$OUT_DIR" >> "$GITHUB_PATH"
"$OUT_DIR/lade" --version