Updating images #344
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
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 Profiles | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Node (for SUSHI) | |
uses: actions/setup-node@v4 | |
with: | |
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: | |
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 |