Skip to content

Commit 4c35274

Browse files
committed
main
1 parent b4e3772 commit 4c35274

File tree

3 files changed

+88
-2
lines changed

3 files changed

+88
-2
lines changed

.github/workflows/build-main.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-24.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: "0" # necessary for `npm run print-version`
14+
15+
- uses: pnpm/action-setup@v4
16+
name: Install pnpm
17+
with:
18+
run_install: false
19+
- name: Install Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: 'pnpm'
24+
25+
- name: Install dependencies
26+
run: pnpm install
27+
28+
- name: copy config.build
29+
run: cp -R config.build node_modules/config
30+
31+
32+
- name: Build
33+
run: pnpm build
34+
35+
- name: Docker meta
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: |
40+
docker.io/fnndsc/chris_ui
41+
ghcr.io/fnndsc/chris_ui
42+
tags: |
43+
type=ref,event=branch
44+
type=ref,event=pr
45+
type=raw,value=latest,enable={{is_default_branch}}
46+
type=sha,format=short,prefix=
47+
- uses: docker/setup-qemu-action@v3
48+
- uses: docker/setup-buildx-action@v3
49+
with:
50+
driver-opts: network=host
51+
- name: Login to DockerHub
52+
id: dockerhub_login
53+
continue-on-error: true
54+
uses: docker/login-action@v3
55+
with:
56+
username: ${{ secrets.DOCKERHUB_USERNAME }}
57+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
58+
- name: Login to GitHub Container Registry
59+
id: ghcr_login
60+
continue-on-error: true
61+
uses: docker/login-action@v3
62+
with:
63+
registry: ghcr.io
64+
username: ${{ github.repository_owner }}
65+
password: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Build and push
68+
uses: docker/build-push-action@v6
69+
with:
70+
tags: ${{ steps.meta.outputs.tags }}
71+
context: .
72+
file: ./Dockerfile
73+
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7,linux/386
74+
push: ${{ steps.dockerhub_login.outcome == 'success' && steps.ghcr_login.outcome == 'success' }}
75+
76+
- name: Update DockerHub description
77+
uses: peter-evans/dockerhub-description@v4
78+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.dockerhub_login.outcome == 'success'
79+
with:
80+
username: ${{ secrets.DOCKERHUB_USERNAME }}
81+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
82+
short-description: ChRIS user interface
83+
readme-filepath: ./README.md
84+
repository: fnndsc/chris_ui

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ yarn-error.log*
3838
.yarnrc
3939
dist/
4040
.pnpm-store/
41+
/config.prod

docker-compose.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ name: chris-ui
22

33
services:
44
chris-ui:
5-
image: ghcr.io/fnndsc/chris_ui:branch-7.0
5+
image: ghcr.io/fnndsc/chris_ui:main
6+
pull_policy: always
67
ports:
78
- "127.0.0.1:5173:8080"
89
restart: always
9-
env:
10+
environment:
1011
CHRIS_UI_URL: ${CHRIS_UI_URL}
1112
PFDCM_URL: ${PFDCM_URL}
1213
SERVER_HEALTH: true

0 commit comments

Comments
 (0)