Release new package #9
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
# publish on ig | |
name: Release new package | |
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 | |
- name: Get From site esante | |
run: | | |
#Creation des répertoires d'init | |
#mkdir ./igRepo/input/images/NOS/ | |
mkdir ./igRepo/input/NOS | |
#Recuperation des NOS en json | |
wget -q https://esante.gouv.fr/sites/default/files/media_entity/documents/NOS-Fichiers_Publics-Versions_json_fhir.zip | |
unzip NOS-Fichiers_Publics-Versions_json_fhir.zip -d ./igRepo/input/NOS | |
#Suppression des fichiers en erreur | |
rm ./igRepo/input/NOS/TRE_R13-Commune-FHIR.json | |
rm ./igRepo/input/NOS/ASS_X12-CommuneDeptRegionOM-FHIR.json | |
rm ./igRepo/input/NOS/JDV_J120-CommuneHistorisee-FHIR.json | |
rm ./igRepo/input/NOS/JDV_J124-Commune-FHIR.json | |
#rm ./input/NOS/ASS_A11-CorresModeleCDA-XdsFormatCode-CISIS-FHIR.json | |
#rm ./input/NOS/ASS_X16-CorrespondanceType-Classe-DMP-FHIR.json | |
rm ./igRepo/input/NOS/JDV_J151-BodySiteBodyTemperature-ENS-FHIR.json | |
rm ./igRepo/input/NOS/ASS_* | |
# 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 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 Sushi | |
run: npm install -g fsh-sushi | |
- name: Install ruby and jekyll | |
run: | | |
sudo apt-get install ruby-full | |
sudo gem install jekyll | |
# 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/latest/download/publisher.jar | |
- name: Run sushi | |
run: sushi igRepo | |
- name: 🏃♂️ Run IG Publisher | |
run : java -Xmx8192m -jar publisher.jar publisher -ig igRepo/. | |
- name: Get From site esante | |
run: | | |
#Recuperation des fichier .json | |
wget -q https://esante.gouv.fr/sites/default/files/media_entity/documents/NOS-Fichiers_Publics-Versions_json_fhir.zip | |
cp NOS-Fichiers_Publics-Versions_json_fhir.zip ./IG-website-release/www/ig/nos/NOS | |
unzip NOS-Fichiers_Publics-Versions_json_fhir.zip -d ./IG-website-release/www/ig/nos/NOS | |
#Recucperation des fichiers .tabs | |
wget -q https://esante.gouv.fr/sites/default/files/media_entity/documents/NOS-Fichiers_Publics.zip | |
cp NOS-Fichiers_Publics.zip ./IG-website-release/www/ig/nos/NOS/ | |
unzip NOS-Fichiers_Publics.zip -d ./IG-website-release/www/ig/nos/NOS | |
#Recupération des fichiers SVS | |
wget -q https://esante.gouv.fr/sites/default/files/media_entity/documents/NOS-Fichiers_Publics-Versions_xml_svs.zip | |
cp NOS-Fichiers_Publics-Versions_xml_svs.zip ./IG-website-release/www/ig/nos/NOS | |
unzip NOS-Fichiers_Publics-Versions_xml_svs.zip -d ./IG-website-release/www/ig/nos/NOS | |
#Recupération des fichiers xml Fhir | |
wget -q https://esante.gouv.fr/sites/default/files/media_entity/documents/nos-fichiers_publics-versions_xml_fhir.zip | |
cp nos-fichiers_publics-versions_xml_fhir.zip ./IG-website-release/www/ig/nos/NOS | |
unzip nos-fichiers_publics-versions_xml_fhir.zip -d ./IG-website-release/www/ig/nos/NOS | |
#Recuperation des fichiers PDF | |
wget -q https://esante.gouv.fr/sites/default/files/media_entity/documents/NOS-Fichiers_Publics_JDV-Versions_pdf.zip | |
cp NOS-Fichiers_Publics_JDV-Versions_pdf.zip ./IG-website-release/www/ig/nos/NOS | |
unzip NOS-Fichiers_Publics_JDV-Versions_pdf.zip -d ./IG-website-release/www/ig/nos/NOS | |
wget -q https://esante.gouv.fr/sites/default/files/media_entity/documents/NOS-Fichiers_Publics_TRE_ASS-Versions_pdf.zip | |
cp NOS-Fichiers_Publics_TRE_ASS-Versions_pdf.zip ./IG-website-release/www/ig/nos/NOS | |
unzip NOS-Fichiers_Publics_TRE_ASS-Versions_pdf.zip -d ./IG-website-release/www/ig/nos/NOS | |
- name: Install rename | |
run : sudo apt install rename | |
- name: Rename TRE | |
run : rename -v 's/TRE_/CodeSystem-TRE-/' ./IG-website-release/www/ig/nos/NOS/* | |
- name: Rename JDV | |
run : rename -v 's/JDV_/ValueSet-JDV-/' ./IG-website-release/www/ig/nos/NOS/* | |
- name: 1 ZIP JDV PDF | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-jdv-pdf.zip ./IG-website-release/www/ig/nos/NOS/*JDV-*.pdf | |
- name: 1 ZIP JDV SVS | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-jdv-svs.zip ./IG-website-release/www/ig/nos/NOS/*JDV-*.xml -x "*FHIR*" | |
- name: 1 ZIP JDV FHIR JSON | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-jdv-fhir-json.zip ./IG-website-release/www/ig/nos/NOS/*JDV-*-FHIR.json | |
- name: 1 ZIP JDV FHIR XML | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-jdv-fhir-xml.zip ./IG-website-release/www/ig/nos/NOS/*JDV-*-FHIR.xml | |
- name: 1 ZIP JDV FHIR tabs | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-jdv-tabs.zip ./IG-website-release/www/ig/nos/NOS/*JDV-*.tabs | |
- name: 2 ZIP TRE PDF | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-tre-pdf.zip ./IG-website-release/www/ig/nos/NOS/*TRE-*.pdf | |
- name: 2 ZIP TRE SVS | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-tre-svs.zip ./IG-website-release/www/ig/nos/NOS/*TRE*.xml -x "*FHIR*" | |
- name: 2 ZIP TRE FHIR JSON | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-tre-fhir-json.zip ./IG-website-release/www/ig/nos/NOS/*TRE*-FHIR.json | |
- name: 2 ZIP TRE FHIR XML | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-tre-fhir-xml.zip ./IG-website-release/www/ig/nos/NOS/*TRE*-FHIR.xml | |
- name: 2 ZIP TRE FHIR tabs | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-tre-tabs.zip ./IG-website-release/www/ig/nos/NOS/*TRE*.tabs | |
- name: 3 ZIP ASS PDF | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-ass-pdf.zip ./IG-website-release/www/ig/nos/NOS/ASS_*.pdf | |
- name: 3 ZIP ASS SVS | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-ass-svs.zip ./IG-website-release/www/ig/nos/NOS/ASS*.xml -x "*FHIR*" | |
- name: 3 ZIP ASS FHIR JSON | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-ass-fhir-json.zip ./IG-website-release/www/ig/nos/NOS/ASS*-FHIR.json | |
- name: 3 ZIP ASS FHIR XML | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-ass-fhir-xml.zip ./IG-website-release/www/ig/nos/NOS/ASS*-FHIR.xml | |
- name: 3 ZIP ASS FHIR tabs | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-ass-tabs.zip ./IG-website-release/www/ig/nos/NOS/ASS*.tabs | |
- name: ZIP Ensemble des NOS au format CSV | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-Fichiers_Publics.zip ./IG-website-release/www/ig/nos/NOS/*.tabs | |
- name: ZIP Ensemble des NOS au format XML/SVS | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS-Fichiers_Publics-Versions_xml_svs.zip ./IG-website-release/www/ig/nos/NOS/*.xml -x "*FHIR*" | |
- name: ZIP Ensemble des NOS au format JSON/FHIR (ZIP) | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-Fichiers_Publics-Versions_json_fhir.zip ./IG-website-release/www/ig/nos/NOS/*-FHIR.json | |
#- name: ZIP Ensemble des NOS au format XML/FHIR (ZIP) | |
# run : zip -rj ./IG-website-release/www/ig/nos/NOS/Nos-fichiers_publics-versions_xml_fhir.zip ./IG-website-release/www/ig/nos/NOS/*-FHIR.xml | |
- name: ZIP Jeux de valeurs du CI-SIS (ZIP | |
run : zip -rj ./IG-website-release/www/ig/nos/NOS/NOS-Jeux_de_Valeurs_CI-SIS.zip ./IG-website-release/www/ig/nos/NOS/*CISIS* | |
# Builds the HTML page for the IG. | |
- name: 🏃♂️ Generate package registry | |
run : java -Dfile.encoding=UTF-8 -jar publisher.jar -generate-package-registry ./IG-website-release | |
- name: 🏃♂️ Run Publisher to release | |
run : java -Dfile.encoding=UTF-8 -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 on IG-website-release | |
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 on IG-website-release | |
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 |