Skip to content

Commit

Permalink
Merge pull request #114 from medizininformatik-initiative/updating-im…
Browse files Browse the repository at this point in the history
…ages

Updating images
  • Loading branch information
ThomasDeBe authored Oct 7, 2024
2 parents 3e3db7b + 62fcc00 commit 9f26163
Show file tree
Hide file tree
Showing 156 changed files with 2,761 additions and 859 deletions.
75 changes: 59 additions & 16 deletions .github/workflows/build-profiles.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,74 @@
name: FHIR Profiles
name: Build FHIR Profiles

env:
NODE_VERSION: 20
DOTNET_VERSION: 8

defaults:
run:
shell: bash

on:
push:
paths:
- "**.fsh"
- "**/package.json"
- "**/sushi-config.yaml"
branches:
- dev
- main

pull_request:
branches:
- dev
- main

workflow_dispatch:

jobs:
build-profiles:
name: Build
name: Build Profiles
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: profiles
- name: Get FHIR packages
uses: cybernop/fill-fhir-cache@v1
with:
project-dir: profiles
- name: Update FHIR Profiles
uses: cybernop/build-fhir-profiles@v1
uses: actions/checkout@v4

- name: Install Node (for SUSHI)
uses: actions/setup-node@v4
with:
sushi-version: "3.11.0"
project-dir: profiles
- name: Push built Profiles
uses: cybernop/push-fsh-profiles@v1
node-version: ${{ env.NODE_VERSION }}

- name: Install latest SUSHI
run: npm install -g fsh-sushi

- name: Install .NET SDK (for Firely Terminal)
uses: actions/setup-dotnet@v4
with:
project-dir: profiles
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install latest Firely Terminal
run: dotnet tool install -g firely.terminal

- name: Get all FHIR packages
run: fhir restore

- name: Generate depended FHIR packages snapshots
run: fhir deps | tr ' ' '@' | xargs -I% fhir inflate --package % --snapshot --expand --force

- name: Build FHIR profiles
run: sushi .

- name: Push built FHIR profiles
run: |
if [[ `git status --porcelain` ]]; then
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.${{ github.repository_owner }}"
git fetch origin ${{ github.head_ref }}
git stash
git checkout ${{ github.head_ref }}
git pull origin ${{ github.head_ref }}
git stash pop
git add fsh-generated
git commit -m "[GEN] Generate FHIR profiles"
git push
fi
Loading

0 comments on commit 9f26163

Please sign in to comment.