Fix for sms chat interface #782
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
name: Build Ottehr | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: | |
- packages/* | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- name: Create secrets file from github secrets | |
id: create-json | |
uses: jsdaniell/[email protected] | |
with: | |
name: 'secrets.json' | |
json: ${{ secrets.OTTEHR_SECRETS_JSON }} | |
- name: Set the telemed-ehr/zambdas/.env/development.json | |
run: cp packages/telemed-ehr/zambdas/.env/local.template.json packages/telemed-ehr/zambdas/.env/development.json | |
- name: Set the telemed-intake/zambdas/.env/development.json | |
run: cp packages/telemed-intake/zambdas/.env/local.template.json packages/telemed-intake/zambdas/.env/development.json | |
- name: Set the urgent-care-intake/zambdas/.env/development.json | |
run: cp packages/urgent-care-intake/zambdas/.env/local.template.json packages/urgent-care-intake/zambdas/.env/development.json | |
- id: get-store-path | |
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
timeout-minutes: 5 | |
id: cache-pnpm-store | |
with: | |
path: ${{ steps.get-store-path.outputs.STORE_PATH }} | |
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-store- | |
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} | |
- name: Run build.sh | |
env: | |
NODE_OPTIONS: '--max-old-space-size=8192' | |
run: ./scripts/build.sh | |
- name: Report status - Success | |
if: ${{ always() }} | |
run: echo "::set-output name=build_status::success" | |
- name: Report status - Failure | |
if: ${{ failure() }} | |
run: echo "::set-output name=build_status::failure" | |
- name: Set status | |
if: ${{ env.build_status != '' }} | |
run: | | |
if [[ "${{ env.build_status }}" == "success" ]]; then | |
echo "Build successful - setting status" | |
gh pr status "$GITHUB_SHA" -s success -d "Build successful" | |
else | |
echo "Build failed - setting status" | |
gh pr status "$GITHUB_SHA" -s failure -d "Build failed" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |