This repository has been archived by the owner on Dec 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a85a8ca
commit 1ffc91b
Showing
5 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Update package feed | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Creates a new package-feed.xml from releases using the Liquid template. | ||
- name: 📃 Create package feed | ||
run: | | ||
npm install liquidjs | ||
cat package-feed.liquid | npx liquidjs '{"releases":$(wget -q -O - https://api.github.com/repos/navikt/fhir/releases)}' > package-feed.xml | ||
# Publishes the generated package-feed.xml to a seperate branch in order to host it using GitHub-Pages. | ||
# This will overwrite the currently published package-feed.xml. | ||
- name: 🚀 Deploy to GitHub-Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
exclude_assets: '**, !package-feed.xml' | ||
commit_message: 'Updated package-feed.xml' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
**/_preprocessed | ||
**/_genonce* | ||
**/_updatePublisher* | ||
**/*.jar | ||
**/*.jar | ||
package-feed.xml |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{%- comment -%} | ||
A Liquid Template used to transform json at https://api.github.com/repos/navikt/fhir/releases | ||
into a FHIR Package RRS feed according to template http://hl7.org/fhir/package-feed.xml. | ||
This is required to publish packages to the FHIR Package Registry: https://registry.fhir.org/submit | ||
Bash command: | ||
cat package-feed.liquid | npx liquidjs '{"releases":$(wget -q -O - https://api.github.com/repos/navikt/fhir/releases)}' > package-feed.xml | ||
{%- endcomment -%} | ||
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:fhir="http://hl7.org/fhir/feed" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> | ||
<channel> | ||
<title>NAV FHIR Packages</title> | ||
<description>New Packages published by NAV</description> | ||
<link>https://navikt.github.io/fhir/package-feed.xml</link> | ||
<generator>HL7, Inc FHIR Publication tooling</generator> | ||
<lastBuildDate>{{ "now" | date: "%a, %d %b %Y %H:%M:%S GMT" }}</lastBuildDate> | ||
<atom:link href="https://navikt.github.io/fhir/package-feed.xml" rel="self" type="application/rss+xml"/> | ||
<pubDate>{{ "now" | date: "%a, %d %b %Y %H:%M:%S GMT" }}</pubDate> | ||
<language>en</language> | ||
<ttl>600</ttl> | ||
{%- for release in releases -%} | ||
{%- assign package = release.assets | where: "name", "package.tgz" | first %} | ||
<item> | ||
<title>{{ release.tag_name | replace: "-", "#" }}</title> | ||
<description/> | ||
<link>{{ package.browser_download_url }}</link> | ||
<guid isPermaLink="true">{{ package.browser_download_url }}</guid> | ||
<dc:creator>NAV</dc:creator> | ||
<fhir:version>4.0.1</fhir:version> | ||
<fhir:kind>fhir.ig</fhir:kind> | ||
<pubDate>{{ release.published_at | date: "%a, %d %b %Y %H:%M:%S GMT" }}</pubDate> | ||
</item> | ||
{%- endfor %} | ||
</channel> | ||
</rss> |