-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds build workflows and fixes build
Signed-off-by: Sean Sundberg <[email protected]>
- Loading branch information
Showing
15 changed files
with
312 additions
and
73 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
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-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
categories: | ||
- title: 'Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: 'Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: 'Maintenance' | ||
label: 'chore' | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
template: | | ||
$CHANGES |
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,15 @@ | ||
name: Update dependencies | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the main branch | ||
on: | ||
repository_dispatch: | ||
types: [ released ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- run: "echo 'Deploy: ${{ github.event.client_payload.ref }}'" |
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,102 @@ | ||
name: Docker build | ||
|
||
# Controls when the workflow will run | ||
on: | ||
release: | ||
types: | ||
- published | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Login to CNTK Quay | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_CNTK_USERNAME }} | ||
password: ${{ secrets.QUAY_CNTK_TOKEN }} | ||
|
||
- name: Setup variables | ||
id: variables | ||
shell: bash | ||
run: | | ||
LATEST_ENABLED="true" | ||
RELEASE_TAG=${GITHUB_REF#refs/tags/} | ||
RELEASE_TAG_ENABLED="false" | ||
if [[ "${GITHUB_REF}" =~ refs/tags ]] && [[ "${RELEASE_TAG}" != "main" ]]; then | ||
RELEASE_TAG_ENABLED="true" | ||
else | ||
RELEASE_TAG="main" | ||
fi | ||
echo "Release tag: ${RELEASE_TAG}" | ||
echo "release-tag=$RELEASE_TAG" >> $GITHUB_OUTPUT | ||
echo "Release tag enabled: $RELEASE_TAG_ENABLED" | ||
echo "release-tag-enabled=$RELEASE_TAG_ENABLED" >> $GITHUB_OUTPUT | ||
echo "Latest enabled: $LATEST_ENABLED" | ||
echo "latest-enabled=$LATEST_ENABLED" >> $GITHUB_OUTPUT | ||
- name: Docker CNTK meta | ||
id: cntk-meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
quay.io/ibm_ecosystem_engineering/watsonx-demo-ui | ||
# Docker tags based on the following events/attributes | ||
tags: | | ||
type=raw,value=${{ steps.variables.outputs.release-tag }},enable=${{ steps.variables.outputs.release-tag-enabled }} | ||
type=raw,value=latest | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.cntk-meta.outputs.tags }} | ||
labels: ${{ steps.cntk-meta.outputs.labels }} | ||
|
||
notify: | ||
needs: ["build"] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name != 'pull_request' }} | ||
|
||
strategy: | ||
matrix: | ||
repo: | ||
- ${{ github.repository }} | ||
|
||
steps: | ||
- name: Repository dispatch ${{ matrix.repo }} | ||
uses: cloud-native-toolkit/action-repository-dispatch@main | ||
with: | ||
notifyRepo: ${{ matrix.repo }} | ||
eventType: released | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} |
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,25 @@ | ||
name: Release module | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: rlespinasse/[email protected] | ||
|
||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml | ||
config-name: release-drafter.yaml | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} |
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,19 @@ | ||
FROM registry.access.redhat.com/ubi9/nodejs-18:1-62.1692771036 AS builder | ||
|
||
WORKDIR /opt/app-root/src | ||
|
||
COPY --chown=default:root . . | ||
|
||
RUN mkdir -p /opt/app-root/src/node_modules && \ | ||
ls -lA && \ | ||
npm ci && \ | ||
npm run build | ||
|
||
FROM registry.access.redhat.com/ubi9/nginx-122:1-22.1692771040 | ||
|
||
WORKDIR /opt/app-root/src | ||
|
||
COPY --from=builder --chown=default:root /opt/app-root/src/dist . | ||
COPY --chown=default:root config/nginx/* /opt/app-root/etc/nginx.default.d | ||
|
||
CMD nginx -g "daemon off;" |
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,15 @@ | ||
location /api { | ||
proxy_pass https://watsonx-demo-svc.16suy1d71dxc.us-south.codeengine.appdomain.cloud/; | ||
} | ||
|
||
location /graphql { | ||
proxy_pass https://watsonx-demo-svc.16suy1d71dxc.us-south.codeengine.appdomain.cloud/graphql; | ||
} | ||
|
||
location /subscription { | ||
proxy_pass https://watsonx-demo-svc.16suy1d71dxc.us-south.codeengine.appdomain.cloud/subscription; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_set_header Host $host; | ||
} |
Oops, something went wrong.