forked from dcarbone/install-yq-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
65 lines (58 loc) · 2.17 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Install Quarkus CLI
description: |
Installs a version of Quarkus CLI into the job tool cache using simple shell scripts
branding:
icon: copy
color: orange
inputs:
version:
required: false
description: "Version of Quarkus CLI to install"
default: "3.0.0.Beta1"
outputs:
found:
description: "If 'true', quarkus was already found on this runner"
value: "${{ steps.quarkus-check-unix.outputs.found == 'true' || steps.quarkus-check-windows.outputs.found == 'true' }}"
installed:
description: "If 'true', quarkus was installed by this action"
value: "${{ inputs.force == 'true' || steps.quarkus-check-unix.outputs.found == 'false' || steps.quarkus-check-windows.outputs.found == 'false' }}"
runs:
using: composite
steps:
- name: 'Check for quarkus - Unix-ish'
id: quarkus-check-unix
if: (runner.os == 'Linux' || runner.os == 'macOS')
shell: bash +e {0}
run: |
_quarkus_bin="$(which quarkus)"
if [ -f "${_quarkus_bin}" ]; then
echo "found=true" >> $GITHUB_OUTPUT
else
echo "found=false" >> $GITHUB_OUTPUT
fi
- name: 'Install quarkus - Unix-ish'
if: (runner.os == 'Linux' || runner.os == 'macOS') && (steps.quarkus-check-unix.outputs.found == 'false' || inputs.force == 'true')
shell: bash
env:
QUARKUS_VERSION: '${{ inputs.version }}'
run: $GITHUB_ACTION_PATH/scripts/unixish.sh
# - name: 'Check for quarkus - Windows-ish'
# id: quarkus-check-windows
# if: runner.os == 'Windows'
# shell: powershell
# run: |
# if (Get-Command "quarkus.exe" -ErrorAction SilentlyContinue)
# {
# Add-Content $Env:GITHUB_OUTPUT "found=true"
# }
# else
# {
# Add-Content $Env:GITHUB_OUTPUT "found=false"
# }
# - name: 'Install quarkus - Windows-ish'
# if: runner.os == 'Windows' && (steps.quarkus-check-windows.outputs.found == 'false' || inputs.force == 'true')
# shell: powershell
# env:
# DL_COMPRESSED: "${{ inputs.download-compressed == 'true' }}"
# YQ_VERSION: '${{ inputs.version }}'
# run: '& $Env:GITHUB_ACTION_PATH\scripts\windowsish.ps1'