Skip to content

Commit

Permalink
Update release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
costateixeira committed Sep 23, 2023
1 parent 0fb2723 commit dbbf328
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ReleaseBuild
name: ReleaseBuld

on:
workflow_call: # Reusable by other workflows
Expand All @@ -11,18 +11,31 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: hl7fhir/ig-publisher-base:latest
steps:
- name: Gather prerequisites
run: >
gosu publisher /home/publisher/bin/with-latest-sushi.sh &&
curl -L https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar -o "./publisher.jar" --create-dirs
- name: Checkout current repo to ./source
uses: actions/checkout@v2
with:
# repository: medigree/core
path: source

- name: Checkout HL7/fhir-ig-history-template to ./history-template
uses: actions/checkout@v2
with:
repository: HL7/fhir-ig-history-template
path: history-template

- name: Clone DigitalSQR/smart-releases into ./webroot
run: git clone https://github.com/DigitalSQR/smart-releases.git webroot
- name: Checkout DigitalSQR/smart-releases to ./webroot
uses: actions/checkout@v2
with:
repository: DigitalSQR/smart-releases
path: webroot

- name: Checkout FHIR/ig-registry to ./ig-registry
uses: actions/checkout@v2
Expand All @@ -31,19 +44,26 @@ jobs:
path: ig-registry

- name: Create folder
run: mkdir -p ./fhir-package-cache && chown 1001:127 ./fhir-package-cache
uses: docker://hl7fhir/ig-publisher-base:latest
with:
entrypoint: /bin/sh
args: -c "mkdir -p ./fhir-package-cache && chown 1001:127 ./fhir-package-cache"

- name: Run publisher command
run: java -jar ./publisher.jar publisher -ig source -package-cache-folder ./fhir-package-cache

- name: Run publisher command for publishing release
run: java -Dfile.encoding=UTF-8 -jar publisher.jar -go-publish -package-cache-folder ./fhir-package-cache -source source -web ./webroot -registry ./ig-registry/fhir-ig-list.json -history ./history-template -templates ./webroot/templates
run: java -Dfile.encoding=UTF-8 -jar publisher.jar -go-publish -package-cache-folder ./fhir-package-cache -source source -web $(pwd)/webroot -registry ./ig-registry/fhir-ig-list.json -history ./history-template -templates $(pwd)/webroot/templates

- name: debug- List dirs
run: find . -type d

- name: Configure git to trust the workspace despite the different owner
run:
git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Deploy main
uses: JamesIves/[email protected].2
uses: JamesIves/[email protected].3
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./webroot # The folder the action should deploy.
Expand Down

0 comments on commit dbbf328

Please sign in to comment.