-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yaml
31 lines (30 loc) · 984 Bytes
/
action.yaml
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
name: "Setup hledger"
description: "Download and install hledger binary"
branding:
icon: "dollar-sign"
color: "yellow"
inputs:
version:
description: "Version to install."
required: false
outputs:
version:
description: "Installed version."
value: ${{ steps.install.outputs.version }}
runs:
using: "composite"
steps:
- id: install-version
shell: bash
if: ${{ inputs.version != null }}
run: |
${{ github.action_path }}/src/install.sh --version "${{ inputs.version }}" --dist "$HOME/.local/bin"
echo "version=$($HOME/.local/bin/hledger --version)" >> $GITHUB_OUTPUT
echo "$HOME/.local/bin" >> $GITHUB_PATH
- id: install-default-version
shell: bash
if: ${{ inputs.version == null }}
run: |
${{ github.action_path }}/src/install.sh --dist "$HOME/.local/bin"
echo "version=$($HOME/.local/bin/hledger --version)" >> $GITHUB_OUTPUT
echo "$HOME/.local/bin" >> $GITHUB_PATH