Skip to content

tag_created

tag_created #11

name: Au IG Profiles Go Publish on Tag Creation
on:
repository_dispatch:
types: [tag_created]
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build_core:
if: github.event.client_payload.repository == 'au-fhir-core'
runs-on: ubuntu-latest
container: hl7fhir/ig-publisher-base # use ig publisher base image
steps:
- name: install aws cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
./aws/install
- name: Checkout Publications Repository
uses: actions/checkout@v4
- name: Configure AWS credentials from GitHub OIDC
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::966489602583:role/ghactions_publications_oidc
aws-region: ap-southeast-2
- name: Checkout AU Core Repository
uses: actions/checkout@v4
with:
repository: hl7au/au-fhir-core
path: hl7au/au-fhir-core
- name: Checkout IG History Template Repository
uses: actions/checkout@v4
with:
repository: HL7/fhir-ig-history-template
path: fhir-history
- name: Checkout IG Registry Repository
uses: actions/checkout@v4
with:
repository: hl7au/ig-registry
path: ig-registry
- name: Update Publisher
run: |
echo "Updating Publisher"
./_updatePublisher.sh -f -y
- name: Basic Publish for Au Core
run: |
echo "Generating Publish for AuCore IG..."
java -jar input-cache/publisher.jar -ig hl7au/au-fhir-core/ig.ini
- name: Create directories
run: |
mkdir -p webroot/fhir/core
- name: Download package-list.json
run: |
rm -rf hl7au/au-fhir-core/package-list.json
URL="https://hl7.org.au/fhir"
FULL_URL="$URL/core/package-list.json"
curl --output webroot/fhir/core/package-list.json --url $FULL_URL
- name: Download package-feed.xml
run: |
curl --output webroot/fhir/package-feed.xml --url https://hl7.org.au/fhir/package-feed.xml
- name: Download publication-feed.xml
run: |
curl --output webroot/fhir/publication-feed.xml --url https://hl7.org.au/fhir/publication-feed.xml
- name: Generate Package Registry
run: |
java -jar input-cache/publisher.jar -generate-package-registry webroot
- name: Run AuCore Publisher build
run: java -jar ./input-cache/publisher.jar -go-publish -source ./hl7au/au-fhir-core -web ./webroot -history ./fhir-history -registry ./ig-registry/fhir-ig-list.json -templates ./templates -tx https://txreg.azurewebsites.net/txdev
- name: List directories
run: |
find . -type d
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: publish-output
path: webroot/fhir/core
- name: Upload artifacts to S3
run: aws s3 cp ./build s3://hl7au-fhir-ig/core/${{ github.event.client_payload.tag }} --recursive
build_base:
if: github.event.client_payload.repository == 'au-fhir-base'
runs-on: ubuntu-latest
container: hl7fhir/ig-publisher-base # use ig publisher base image
steps:
- name: install aws cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
./aws/install
- name: Checkout Publications Repository
uses: actions/checkout@v4
- name: Configure AWS credentials from GitHub OIDC
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::966489602583:role/ghactions_publications_oidc
aws-region: ap-southeast-2
- name: Checkout AU base Repository
uses: actions/checkout@v4
with:
repository: hl7au/au-fhir-base
path: hl7au/au-fhir-base
ref: ${{ github.event.client_payload.tag }}
- name: Checkout IG History Template Repository
uses: actions/checkout@v4
with:
repository: HL7/fhir-ig-history-template
path: fhir-history
- name: Checkout IG Registry Repository
uses: actions/checkout@v4
with:
repository: hl7au/ig-registry
path: ig-registry
- name: Update Publisher
run: |
echo "Updating Publisher"
./_updatePublisher.sh -f -y
- name: Basic Publish for Aubase
run: |
echo "Generating Publish for Aubase IG..."
java -jar input-cache/publisher.jar -ig hl7au/au-fhir-base/ig.ini
- name: Create directories
run: |
mkdir -p webroot/fhir/base
- name: Download package-list.json
run: |
rm -rf hl7au/au-fhir-base/package-list.json
URL="https://hl7.org.au/fhir"
FULL_URL="$URL/package-list.json"
curl --output webroot/fhir/base/package-list.json --url $FULL_URL
- name: Download package-feed.xml
run: |
curl --output webroot/fhir/package-feed.xml --url https://hl7.org.au/fhir/package-feed.xml
- name: Download publication-feed.xml
run: |
curl --output webroot/fhir/publication-feed.xml --url https://hl7.org.au/fhir/publication-feed.xml
- name: Generate Package Registry
run: |
java -jar input-cache/publisher.jar -generate-package-registry webroot
- name: Run Aubase Go Publisher build
run: java -jar ./input-cache/publisher.jar -go-publish -source ./hl7au/au-fhir-base -web ./webroot -history ./fhir-history -registry ./ig-registry/fhir-ig-list.json -templates ./templates -tx https://txreg.azurewebsites.net/txdev
- name: List directories
run: |
find . -type d
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: publish-output
path: webroot/fhir/base
- name: Upload artifacts to S3
run: aws s3 cp ./build s3://hl7au-fhir-ig/base/${{ github.event.client_payload.tag }} --recursive --only-show-errors