-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
50 lines (43 loc) · 1.31 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
45
46
47
48
49
50
name: CLI app action
description: 'Run your CLI app with ease'
branding:
icon: 'clipboard'
color: 'blue'
inputs:
version:
description: 'The version of the CLI app to download and use.'
default: ${{ github.action_ref }}
required: true
arguments:
description: 'The command-line arguments to be passed to CLI application.'
default: 'hello'
required: true
working-directory:
required: true
default: ${{ github.workspace }}
description: 'The directory to change into.'
setup-java:
default: 'true'
description: 'Setup internal Java runtime.'
required: false
runs:
using: 'composite'
steps:
- name: 'Setup GraalVM 22.3.0'
uses: graalvm/setup-graalvm@v1
if: ${{ inputs.setup-java == 'true' }}
with:
version: '22.3.0'
java-version: '17'
- name: 'Download the specified CLI app'
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
${{ github.action_path }}/download-cli-tool.sh ${{ inputs.version }}
java -jar cli-app.jar --version
- name: 'Execute the CLI application'
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
echo "Executing 'java -jar cli-app.jar ${{ inputs.arguments }}'"
java -jar cli-app.jar ${{ inputs.arguments }}