-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
44 lines (39 loc) · 1.12 KB
/
action.yml
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
name: "Install cydonia"
description: "Install cydonia, the static site generator."
branding:
icon: book-open
color: orange
inputs:
version:
required: true
description: The version of cydonia to install
default: "0.0.8"
runs:
using: composite
steps:
- uses: actions/cache@v3
with:
path: ~/.cargo/bin/cydonia
key: cydonia-${{ inputs.version }}-${{ runner.os }}
restore-keys: cydonia-${{ inputs.version }}
- name: Find cydonia
id: cache
shell: bash
run: |
BIN=~/.cargo/bin/cydonia
if [ -f $BIN ]; then
VERSION=$($BIN --version)
if [ "$VERSION" -nq ${{ inputs.version }} ]; then
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Install rust-toolchain
id: install-rust
if: ${{ steps.cache.outputs.skip == 'false' }}
uses: dtolnay/rust-toolchain@stable
- name: Install cydonia
if: ${{ steps.cache.outputs.skip == 'false' }}
shell: bash
run: cargo install cydonia --version ${{ inputs.version }}