Skip to content

Commit

Permalink
Merge pull request #1 from HL7Austria/add-github-workflow
Browse files Browse the repository at this point in the history
Add Github Workflow
  • Loading branch information
sa-bre authored Nov 4, 2024
2 parents ccfe676 + d680ada commit 0e39f87
Show file tree
Hide file tree
Showing 9 changed files with 540 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Github Actions HL7 - remove deployment folder after branch deletion in hl7austria.github.io
name: clean deployment
on: delete
jobs:
delete:
if: github.event.ref_type == 'branch'
runs-on: ubuntu-latest
steps:
- name: checkout the hl7austria.github.io
uses: actions/checkout@v2
with:
token: ${{ secrets.ROBO_OLIVER }}
repository: HL7Austria/hl7austria.github.io
path: .
ref: pages
- name: remove folder for deleted branch
run: |
git status
87 changes: 87 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Workflow to deploy with IG Publisher and Shorthand to the hl7austria.github.io repository

name: PublishIG

# Run on updates to the master
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout the implementation guide
uses: actions/checkout@v2
with:
repository: HL7Austria/TC-FHIR-AG-Scheduling-R5
path: .

- name: Extract branch name
run: |
if ["${{ github.event.pull_request.head.ref }}" == ""]; then
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
else
echo "##[set-output name=branch;]$(echo ${{ github.event.pull_request.head.ref }})"
fi
id: extract_branch

- name: Extract last commit date
shell: bash
run: echo "##[set-output name=date;]$(git log -1 --format="%at" | xargs -I{} date -d @{} +%d.%m.%Y)"
id: extract_date

- uses: bluwy/substitute-string-action@v1
id: substitute_index
with:
_input-file: input/landing_page/_index.yml
_format-key: '%%key%%'
branch: ${{ steps.extract_branch.outputs.branch }}
date: ${{ steps.extract_date.outputs.date }}
_output-file: input/landing_page/_index.yml

- name: Install NPM
uses: actions/setup-node@v2.1.2
with:
check-lastest: true

- name: Install Sushi
run: sudo npm install -g fsh-sushi

- name: Install Jekyll
run: |
sudo apt-get install jekyll
- name: Download IG Publisher
uses: Legion2/download-release-action@v2.1.0
with:
repository: HL7/fhir-ig-publisher
tag: 'latest'
path: .
file: publisher.jar

- name: Run IG Publisher
run: |
mkdir input-cache
mv publisher.jar ./input-cache/publisher.jar
unset DISPLAY
java -Djava.awt.headless=true -jar ./input-cache/publisher.jar -ig ig.ini
- name: Move index file
run: |
mv ./input/landing_page/_index.yml ./output/
- name: Deploy Implementation Guide
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.ROBO_OLIVER }}
external_repository: HL7Austria/hl7austria.github.io
publish_branch: pages
publish_dir: ./output
destination_dir: ./r5-TC-FHIR-AG-Scheduling-R5-${{ steps.extract_branch.outputs.branch }}

126 changes: 126 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Workflow to deploy with IG Publisher and Shorthand to the hl7austria.github.io repository

name: PublishIGWithHL7International

# Run on updates to the master
on:
workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
# see https://github.com/stefanzweifel/git-auto-commit-action
contents: write

steps:

- name: Checkout the implementation guide
uses: actions/checkout@v2
with:
repository: HL7Austria/TC-FHIR-AG-Scheduling-R5
path: .

- name: Checkout github io project
uses: actions/checkout@v2
with:
repository: HL7Austria/hl7austria.github.io
path: ./web
ref: pages
token: ${{ secrets.ROBO_OLIVER }}

- name: Checkout FHIR IG Web Templates
uses: actions/checkout@v2
with:
repository: HL7/fhir-web-templates
path: ./fhir-web-templates

- name: Checkout FHIR IG History Templates
uses: actions/checkout@v2
with:
repository: HL7/fhir-ig-history-template
path: ./fhir-ig-history-templates

- name: Checkout FHIR IG Registry
uses: actions/checkout@v2
with:
repository: HL7Austria/ig-registry
path: ./fhir-ig-registry
ref: hl7at-add-publication
token: ${{ secrets.ROBO_OLIVER }}

- name: Extract last commit date
shell: bash
run: echo "##[set-output name=date;]$(git log -1 --format="%at" | xargs -I{} date -d @{} +%d.%m.%Y)"
id: extract_date

- uses: bluwy/substitute-string-action@v1
id: substitute_index
with:
_input-file: input/landing_page/_index.yml
_format-key: '%%key%%'
branch: ${{ github.event.repository.name }}
date: ${{ steps.extract_date.outputs.date }}
_output-file: input/landing_page/_index.yml

- name: Install NPM
uses: actions/setup-node@v2.1.2
with:
check-lastest: true

- name: Install Sushi
run: sudo npm install -g fsh-sushi

- name: Install Jekyll
run: |
sudo apt-get install jekyll
- name: Download IG Publisher
uses: Legion2/download-release-action@v2.1.0
with:
repository: HL7/fhir-ig-publisher
tag: 'latest'
path: .
file: publisher.jar

- name: Run IG Publisher
run: |
mkdir input-cache
mv publisher.jar ./input-cache/publisher.jar
unset DISPLAY
java -Djava.awt.headless=true -jar ./input-cache/publisher.jar -ig ig.ini
- name: Run IG Publisher Go Publish
run: |
unset DISPLAY
java -Djava.awt.headless=true -jar ./input-cache/publisher.jar -go-publish -source ${{github.workspace}} -web ${{github.workspace}}/web -registry ${{github.workspace}}/fhir-ig-registry/fhir-ig-list.json -history ${{github.workspace}}/fhir-ig-history-templates -templates ${{github.workspace}}/fhir-web-templates -temp ${{github.workspace}}/buildtmp
- name: Move index file
run: |
mv ./input/landing_page/_index.yml ./web/${{ github.event.repository.name }}
- name: Remove ig build zip directory
run: |
rm -rvf ./web/ig-build-zips/
- name: Deploy publication
if: success()
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Publish IG
branch: pages
repository: ./web

- name: Deploy updated FHIR IG List.json
if: success()
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: HL7AT - Update IG list
branch: hl7at-add-publication
create_branch: true
repository: ./fhir-ig-registry


61 changes: 61 additions & 0 deletions .github/workflows/quickbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Workflow to deploy with IG Publisher and Shorthand to the hl7austria.github.io repository

name: SecretPublish

# Run on updates to the master
on:
push:
branches: [ 10-naming-of-profiles-and-extensions- ]
pull_request:
branches: [ 10-naming-of-profiles-and-extensions- ]

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout the implementation guide
uses: actions/checkout@v2
with:
repository: HL7Austria/TC-FHIR-AG-Scheduling-R5
path: .

- name: Install NPM
uses: actions/setup-node@v2.1.2
with:
check-lastest: true

- name: Install Sushi
run: sudo npm install -g fsh-sushi

- name: Install Jekyll
run: |
sudo apt-get install jekyll
- name: Download IG Publisher
uses: Legion2/download-release-action@v2.1.0
with:
repository: HL7/fhir-ig-publisher
tag: 'latest'
path: .
file: publisher.jar

- name: Run IG Publisher
run: |
mkdir input-cache
mv publisher.jar ./input-cache/publisher.jar
unset DISPLAY
java -Djava.awt.headless=true -jar ./input-cache/publisher.jar -ig ig.ini
- name: Move index file
run: |
mv ./input/landing_page/_index.yml ./output/
- name: Deploy Implementation Guide
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.ROBO_OLIVER }}
external_repository: HL7Austria/hl7austria.github.io
publish_branch: pages
publish_dir: ./output
destination_dir: ./r5-TC-FHIR-AG-Scheduling-R5-master-10
3 changes: 3 additions & 0 deletions ig.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[IG]
template = hl7.at.fhir.template#current
ig = fsh-generated/resources/ImplementationGuide-TC-FHIR-AG-Scheduling-R5.json
10 changes: 10 additions & 0 deletions input/fsh/Alias.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*##############################################################################
# Type: FSH-File for Alias Collection
# About: Collection of aliases used in the FSH files for FHIR® Profiles,
# Extensions and examples for the HL7® AIST FHIR® PICA Profiles.
# Created by: AIST
##############################################################################*/

Alias: HL7V2 = http://terminology.hl7.org/CodeSystem/v2-0203

// outdated aliases used in previous versions:
6 changes: 6 additions & 0 deletions input/landing_page/_index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- name: TC-FHIR-AG-Scheduling-R5
- version: 0.1.0
- description: Appointment Management on FHIR
- last_published: %%date%%
- branch: %%branch%%
- type: draft
15 changes: 15 additions & 0 deletions package-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"package-id": "TC-FHIR-AG-Scheduling-R5",
"title": "PICA Implementation Guide",
"canonical": "http://hl7.at/fhir/TC-FHIR-AG-Scheduling-R5/R5",
"introduction": "IG for the TC-FHIR-AG-Scheduling-R5 FHIR® Profiles.",
"list": [
{
"version": "current",
"desc": "Draft",
"path": "http://hl7.at/fhir/TC-FHIR-AG-Scheduling-R5/R5",
"status": "ci-build",
"current": true
}
]
}
Loading

0 comments on commit 0e39f87

Please sign in to comment.