Skip to content

Commit 3611056

Browse files
committed
Support to install hd via js
1 parent 9684e5c commit 3611056

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ bin/
33

44
*/**/*.xml
55
coverage.out
6+
node_modules

action.yml

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
name: 'Downloader tool'
2-
description: 'Downloader tool'
1+
name: setup-hd
2+
description: Setup hd, on GitHub Actions runners
33
inputs:
44
version:
5-
description: 'The version of hd'
5+
description: Version of hd CLI to install
66
required: false
7-
default: 'v0.0.69'
8-
tool:
9-
description: 'The desired tool name'
10-
required: true
7+
default: 0.0.69
118
runs:
12-
using: 'docker'
13-
image: 'docker://ghcr.io/linuxsuren/hd:v0.0.69'
14-
args:
15-
- hd
16-
- install
17-
- ${{ inputs.tool }}
18-
- --fetch=true
19-
- --target=/github/home/
20-
- --force
9+
using: composite
10+
steps:
11+
# We verify the version against a SHA **in the published action itself**, not in the GCS bucket.
12+
- shell: bash
13+
run: |
14+
#!/bin/bash
15+
curl -L https://github.com/LinuxSuRen/http-downloader/releases/download/v${{ inputs.version }}/hd-linux-amd64.tar.gz | tar xzv hd
16+
sudo mv hd /usr/bin/hd
17+
hd fetch

0 commit comments

Comments
 (0)