-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
52 lines (47 loc) · 1.69 KB
/
action.yml
File metadata and controls
52 lines (47 loc) · 1.69 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
name: Setup Luca
description: Install the Luca CLI and optionally install project tools from a spec file, adding them to PATH.
branding:
icon: package
color: blue
inputs:
version:
description: >
The version of Luca to install (e.g. "1.2.3"). Omit to install the
latest release. When provided, a `.luca-version` file is written
before the install script runs so the existing version-detection
logic in the install script picks it up automatically.
required: false
default: ""
spec:
description: >
Path to the Luca spec file, relative to the workspace root
(e.g. "Lucafile" or "config/Lucafile-ci"). When provided, tools
are installed and added to PATH. Omit to skip tool installation.
required: false
default: ""
github_token:
description: >
A GitHub token used to authenticate against the github.com API when
downloading the Luca CLI. Defaults to the built-in `github.token`,
which works on github.com. When running on GitHub Enterprise, pass a
github.com Personal Access Token here to avoid API rate limiting.
required: false
default: ""
runs:
using: composite
steps:
- name: Write .luca-version (when version is pinned)
if: inputs.version != ''
shell: bash
run: echo "${{ inputs.version }}" > .luca-version
- name: Install Luca CLI
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github_token || github.token }}
run: curl -fsSL https://luca.tools/install.sh | bash
- name: Install tools
if: inputs.spec != ''
shell: bash
run: |
luca install --spec=${{ inputs.spec }}
echo "$GITHUB_WORKSPACE/.luca/tools" >> $GITHUB_PATH