Skip to content

Commit

Permalink
Merge pull request #1292 from mozzy11/develop
Browse files Browse the repository at this point in the history
Build Installer on Release and Upload it as part of the Release artifacts
  • Loading branch information
mozzy11 authored Oct 29, 2024
2 parents dc1a0bb + d459bda commit ec7f246
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build OpenELIS-Global-2 Installer
on:
release:
types: [published]

jobs:
build-installer-and-upload-installer:
runs-on: ubuntu-latest
steps:

- name: Checkout OpenELIS-Global2
uses: actions/checkout@v2
with:
repository: ${{github.repository}}
submodules: recursive

- name: Build installer
run: ./build.sh -ib develop

- name: check installer
run: ls OEInstaller/linux


- name: Find installer file
id: find_file
run: |
# Find the file in OEInstaller/linux with .tar.gz extension
FILE_PATH=$(find OEInstaller/linux -name "*.tar.gz" -print -quit)
if [ -z "$FILE_PATH" ]; then
echo "No .tar.gz file found in OEInstaller/linux directory."
exit 1
fi
echo "File path: $FILE_PATH"
# Extract the file name from the path
FILE_NAME=$(basename "$FILE_PATH")
echo "File name: $FILE_NAME"
# Pass the file path and name to outputs
echo "FILE_PATH=$FILE_PATH" >> $GITHUB_ENV
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.FILE_PATH }}
asset_name: ${{ env.FILE_NAME }}
asset_content_type: application/gzip

2 changes: 2 additions & 0 deletions .github/workflows/publish-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ jobs:


build-and-push-image-proxy:
needs: [run-e2e-qa]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -429,6 +430,7 @@ jobs:
cache-to: type=registry,ref=${{ env.DOCKER_TEST_NAME }}-proxy:buildcache,mode=max

build-and-push-image-fhir:
needs: [run-e2e-qa]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down

0 comments on commit ec7f246

Please sign in to comment.