-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
87 lines (78 loc) · 2.73 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "FHIR IG Action"
description: "A GitHub Action for FHIR IGs."
author: "Quentin Ligier"
inputs:
ig-publisher:
description: "The IG Publisher version to use. 'latest' | 'x.y.z'"
required: false
default: "latest"
sushi:
description: "The SUSHI version to use. 'latest' | 'false' | 'x' | 'x.y' | 'x.y.z'"
required: false
default: "false"
runs:
using: "composite"
steps:
- name: "Check the inputs"
shell: bash
run: ./check_inputs.sh ${{ inputs.ig-publisher }} ${{ inputs.sushi }}
working-directory: ${{ github.action_path }}
# Install Java 17 for the IG Publisher and the validation engine
# https://github.com/actions/setup-java
- name: "Install Java"
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "21"
# Install ruby
# https://github.com/ruby/setup-ruby
- name: "Install Ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
# Install Jekyll
# https://jekyllrb.com/docs/installation/ubuntu/
- name: "Install Jekyll"
shell: bash
run: |
gem install jekyll bundler
jekyll -v
# Install node if SUSHI is needed
# https://github.com/actions/setup-node
- name: "Install Node.js"
if: ${{ inputs.sushi != 'false' }}
uses: actions/setup-node@v4
with:
node-version: "20"
# Install SUSHI if needed
- name: "Install SUSHI"
if: ${{ inputs.sushi != 'false' }}
shell: bash
run: |
npm install -g fsh-sushi@${{ inputs.sushi }}
sushi --version
# Download the IG Publisher
- name: "Download the IG Publisher"
shell: bash
run: |
mkdir ./input-cache
curl -sS -L https://github.com/HL7/fhir-ig-publisher/releases/${{ inputs.ig-publisher }}/download/publisher.jar -o ./input-cache/publisher.jar
chmod +x ./input-cache/publisher.jar
# We can build the IG now
- name: "Build the IG"
shell: bash
env:
FORCE_COLOR: "true" # Force colors in SUSHI output
FORCE_FANCY_CHARACTERS: "true" # Force fancy characters in SUSHI output
# Here we enable problem matchers that will allow GitHub to parse errors and warnings in the CLI output
# See https://github.com/qligier/fhir-ig-action/wiki/Problem-matchers
run: |
echo "::add-matcher::${{ github.action_path }}/igpublisher-problem-matcher.json"
echo "::add-matcher::${{ github.action_path }}/sushi-problem-matcher.json"
java -Xmx8G -jar input-cache/publisher.jar ig.ini
echo "::remove-matcher owner=igpublisher::"
echo "::remove-matcher owner=sushi-error::"
echo "::remove-matcher owner=sushi-warning::"
branding:
icon: "play"
color: "orange"