Skip to content

Build IG

Build IG #1022

Workflow file for this run

name: Build IG
on:
schedule:
- cron: '00 4,10,15 * * *'
workflow_call:
workflow_dispatch:
# The following jobs are equal for all IGs and can be moved to a common composite-action if 'uses'-support is added, see:
# https://github.com/actions/runner/blob/main/docs/adrs/1144-composite-actions.md
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
#- uses: actions/setup-java@v3
# with:
# distribution: 'oracle'
# java-version: '17'
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install rename
run : sudo apt install rename
- name: Get From site esante
run: |
#Creation des répertoires d'init
#mkdir ./input/images/NOS/
mkdir ./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 ./input/NOS
#Suppression des fichiers en erreur
rm ./input/NOS/TRE_R13-CommuneOM-FHIR.json
rm ./input/NOS/ASS_X12-CommuneDeptRegionOM-FHIR.json
rm ./input/NOS/JDV_J120-CommuneHistorisee-FHIR.json
rm ./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 ./input/NOS/JDV_J151-BodySiteBodyTemperature-ENS-FHIR.json
rm ./input/NOS/ASS_*
- name: 📥 Download test tools
run: |
wget -q https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar
- name: ✔️ Run tests
run: java -Xmx8192m -jar validator_cli.jar ./input/NOS/TRE_R* -recurse -output-style compact -output rapport.html
continue-on-error: true
# 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: Install modules
run: npm install -g fsh-sushi
- name: Build and test with Rake
run: |
sudo apt-get install ruby-full
sudo gem install jekyll
- name: Run sushi
run: sushi .
# Builds the HTML page for the IG.
- name: 🏃‍♂️ Run IG Publisher
run : java -Xmx8192m -jar publisher.jar publisher -ig .
- name: Generate list using Markdown
run: |
echo "### Rapport de validation (validator_cli) :rocket:" >> $GITHUB_STEP_SUMMARY
cat rapport.html >> $GITHUB_STEP_SUMMARY
- 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 ./output/NOS
unzip NOS-Fichiers_Publics-Versions_json_fhir.zip -d ./output/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 ./output/NOS/
unzip NOS-Fichiers_Publics.zip -d ./output/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 ./output/NOS
unzip NOS-Fichiers_Publics-Versions_xml_svs.zip -d ./output/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 ./output/NOS
unzip nos-fichiers_publics-versions_xml_fhir.zip -d ./output/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 ./output/NOS
unzip NOS-Fichiers_Publics_JDV-Versions_pdf.zip -d ./output/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 ./output/NOS
unzip NOS-Fichiers_Publics_TRE_ASS-Versions_pdf.zip -d ./output/NOS
- name: Rename TRE
run : rename -v 's/TRE_/CodeSystem-TRE-/' ./output/NOS/*
- name: Rename JDV
run : rename -v 's/JDV_/ValueSet-JDV-/' ./output/NOS/*
- name: 1 ZIP JDV PDF
run : zip -rj ./output/NOS/NOS-jdv-pdf.zip ./output/NOS/*JDV-*.pdf
- name: 1 ZIP JDV SVS
run : zip -rj ./output/NOS/NOS-jdv-svs.zip ./output/NOS/*JDV-*.xml -x "*FHIR*"
- name: 1 ZIP JDV FHIR JSON
run : zip -rj ./output/NOS/NOS-jdv-fhir-json.zip ./output/NOS/*JDV-*-FHIR.json
- name: 1 ZIP JDV FHIR XML
run : zip -rj ./output/NOS/NOS-jdv-fhir-xml.zip ./output/NOS/*JDV-*-FHIR.xml
- name: 1 ZIP JDV FHIR tabs
run : zip -rj ./output/NOS/NOS-jdv-tabs.zip ./output/NOS/*JDV-*.tabs
- name: 2 ZIP TRE PDF
run : zip -rj ./output/NOS/NOS-tre-pdf.zip ./output/NOS/*TRE-*.pdf
- name: 2 ZIP TRE SVS
run : zip -rj ./output/NOS/NOS-tre-svs.zip ./output/NOS/*TRE*.xml -x "*FHIR*"
- name: 2 ZIP TRE FHIR JSON
run : zip -rj ./output/NOS/NOS-tre-fhir-json.zip ./output/NOS/*TRE*-FHIR.json
- name: 2 ZIP TRE FHIR XML
run : zip -rj ./output/NOS/NOS-tre-fhir-xml.zip ./output/NOS/*TRE*-FHIR.xml
- name: 2 ZIP TRE FHIR tabs
run : zip -rj ./output/NOS/NOS-tre-tabs.zip ./output/NOS/*TRE*.tabs
- name: 3 ZIP ASS PDF
run : zip -rj ./output/NOS/NOS-ass-pdf.zip ./output/NOS/ASS_*.pdf
- name: 3 ZIP ASS SVS
run : zip -rj ./output/NOS/NOS-ass-svs.zip ./output/NOS/ASS*.xml -x "*FHIR*"
- name: 3 ZIP ASS FHIR JSON
run : zip -rj ./output/NOS/NOS-ass-fhir-json.zip ./output/NOS/ASS*-FHIR.json
- name: 3 ZIP ASS FHIR XML
run : zip -rj ./output/NOS/NOS-ass-fhir-xml.zip ./output/NOS/ASS*-FHIR.xml
- name: 3 ZIP ASS FHIR tabs
run : zip -rj ./output/NOS/NOS-ass-tabs.zip ./output/NOS/ASS*.tabs
- name: ZIP Ensemble des NOS au format CSV
run : zip -rj ./output/NOS/NOS-Fichiers_Publics.zip ./output/NOS/*.tabs
- name: ZIP Ensemble des NOS au format XML/SVS
run : zip -rj ./output/NOS/NOS-Fichiers_Publics-Versions_xml_svs.zip ./output/NOS/*.xml -x "*FHIR*"
- name: ZIP Ensemble des NOS au format JSON/FHIR (ZIP)
run : zip -rj ./output/NOS/NOS-Fichiers_Publics-Versions_json_fhir.zip ./output/NOS/*-FHIR.json
#- name: ZIP Ensemble des NOS au format XML/FHIR (ZIP)
# run : zip -rj ./output/NOS/Nos-fichiers_publics-versions_xml_fhir.zip ./output/NOS/*-FHIR.xml
- name: ZIP Jeux de valeurs du CI-SIS (ZIP
run : zip -rj ./output/NOS/NOS-Jeux_de_Valeurs_CI-SIS.zip ./output/NOS/*CISIS*
- name: Get branch names
id: branch-name
uses: tj-actions/[email protected]
# Publishes the HTML page to a seperate branch in order to host it using GitHub-Pages.
# This will overwrite the currently published HTML page.
- name: 🚀 Deploy to GitHub-Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
exclude_assets: '**ig.zip.zip,**CodeSystem-TRE-R13-CommuneOM.xml.html**'
destination_dir: ig/${{ steps.branch-name.outputs.current_branch }}
commit_message: ' ${{ github.event.head_commit.message }}'