generated from ansforge/IG-modele
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# publish on ig | ||
|
||
name: Release Inside | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get IG-website-release | ||
uses: actions/checkout@main | ||
with: | ||
persist-credentials: false | ||
repository: ansforge/IG-website-release | ||
path: IG-website-release | ||
|
||
- name: Init | ||
run: | | ||
cd IG-website-release | ||
git submodule update --init --recursive | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: igRepo | ||
|
||
|
||
# Install .NET runtime | ||
- name: Setup .NET Core SDK | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: '6.x.x' | ||
|
||
# Install Java runtime (only needed if you want to run the offical HL7 Java validator) | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'microsoft' | ||
java-version: '17' | ||
- name : firely | ||
run : dotnet tool install --global Firely.Terminal --version 3.0.0 | ||
|
||
- name: Check Firely Terminal Version | ||
run: | | ||
CHECK_FIRELY_TERMINAL_VERSION=$(fhir -v | tr '\n' ' ') # Print everything in a single line | ||
echo "FIRELY_TERMINAL_VERSION: $CHECK_FIRELY_TERMINAL_VERSION" | ||
- name: Run bake ans.annuaire.fhir.r4 | ||
run: | | ||
fhir install ans.annuaire.fhir.r4 0.2.0 | ||
fhir bake --package ans.annuaire.fhir.r4 | ||
- name: Run bake hl7.fhir.fr.core | ||
run: | | ||
fhir install hl7.fhir.fr.core 1.1.0 | ||
fhir bake --package hl7.fhir.fr.core | ||
# Persist the FHIR Package Cache between runners. | ||
# Doc: https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache | ||
- name: 🗂️ Cache FHIR Packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.fhir/packages | ||
key: fhir-packages | ||
|
||
- name: Install modules | ||
run: npm install -g fsh-sushi | ||
- name: Run sushi | ||
run: sushi igRepo | ||
|
||
|
||
# Downloads the newest version of the IG Publisher, this could probable be cached. | ||
- name: 📥 Download IG Publisher | ||
run: wget -q https://github.com/HL7/fhir-ig-publisher/releases/download/1.3.7/publisher.jar | ||
|
||
|
||
- name: Build and test with Rake | ||
run: | | ||
sudo apt-get install ruby-full | ||
sudo gem install jekyll | ||
# Builds the HTML page for the IG. | ||
- name: 🏃♂️ Run IG Publisher | ||
run : java -Xmx8192m -jar publisher.jar publisher -ig igRepo/. | ||
|
||
- name: 🏃♂️ Run Publisher to release | ||
run : java -jar publisher.jar -go-publish -source igRepo -web ./IG-website-release/www/ig -registry ./IG-website-release/ig-registry/fhir-ig-list.json -history ./IG-website-release/fhir-ig-history-template -templates ./IG-website-release/templates | ||
|
||
|
||
|
||
- name: Commit change | ||
run: | | ||
cd IG-website-release | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add -A | ||
git commit -m updated | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.ANS_IG_API_TOKEN }} | ||
directory: IG-website-release | ||
repository : ansforge/IG-website-release | ||
force : true |