-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaction.yml
60 lines (56 loc) · 1.58 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
51
52
53
54
55
56
57
58
59
60
---
name: Setup COBOL
author: Yevhen Fabizhevskyi
description: This action sets up GnuCOBOL.
branding:
icon: terminal
color: gray-dark
inputs:
version:
description: "GnuCOBOL version."
required: false
default: "3.2"
force:
description: |
If "true" it installs cobc even if it is already installed on a runner.
Otherwise, skips installation.
default: "false"
required: false
outputs:
installed:
description: Whether cobc was installed or not.
value: "${{ steps.install-cobc.outcome == 'success' }}"
runs:
using: "composite"
steps:
- name: Fail
if: ${{ runner.os != 'Linux' }}
run: |
echo "::error title=OS is not supported::${RUNNER_OS} ${RUNNER_ARCH} is not supported"
exit 1
shell: sh
- name: Validate inputs
id: validate-inputs
env:
INPUT_FORCE: "${{ inputs.force }}"
run: ./validate-inputs.sh "${INPUT_FORCE}"
shell: sh
working-directory: ${{ github.action_path }}/src
- name: Collect info
id: info
env:
INPUT_FORCE: "${{ inputs.force }}"
run: ./collect-info.sh "${INPUT_FORCE}"
shell: sh
working-directory: ${{ github.action_path }}/src
- name: Install COBOL
if: ${{ steps.info.outputs.bin-installed == 'false' }}
id: install-cobc
env:
INPUT_VERSION: "${{ inputs.version }}"
run: ./install-cobc.sh "${INPUT_VERSION}" "${{ steps.info.outputs.bin-path }}"
shell: sh
working-directory: ${{ github.action_path }}/src
- name: Print version
run: cobc --info
shell: sh