Skip to content

Commit 73fe44d

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/kubectl-command-helper-dialogs
2 parents b44f4e2 + b40654c commit 73fe44d

File tree

10 files changed

+566
-1710
lines changed

10 files changed

+566
-1710
lines changed

.github/workflows/on-release.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Release builds and publish a new release.
2+
# It will run necessary tests. Then it builds the docker image, pushes it to the container registry, and creates a new Github Release (and git tag) with automated release notes (automated release notes powered by GitHub).
3+
4+
name: Release
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
nextVersion:
10+
description: 'specify the release version in the semver format v[major].[minor].[patch] e.g. v0.0.0'
11+
required: true
12+
13+
# base permissions for all jobs should be minimal
14+
permissions:
15+
contents: read
16+
17+
env:
18+
REGISTRY: ghcr.io/openmcp-project
19+
IMAGE_NAME: mcp-ui-frontend
20+
21+
jobs:
22+
run-build:
23+
uses: ./.github/workflows/build.yaml
24+
25+
release:
26+
runs-on: ubuntu-latest
27+
needs:
28+
- run-build
29+
30+
permissions:
31+
contents: write # write release tag to the repo
32+
packages: write # push the container to ghcr
33+
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
fetch-depth: 0 # Fetch all history for all tags and branches
39+
40+
- name: Check if tag already exists
41+
id: check_tag
42+
run: |
43+
if git rev-parse ${{ github.event.inputs.nextVersion }} >/dev/null 2>&1
44+
then
45+
echo "Tag ${{ github.event.inputs.nextVersion }} already exists."
46+
exit 1
47+
else
48+
echo "Tag does not exit. Building release version ${{ github.event.inputs.nextVersion }}"
49+
fi
50+
51+
- name: Log in to the Container registry
52+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
53+
with:
54+
registry: ${{ env.REGISTRY }}
55+
username: ${{ github.actor }}
56+
password: ${{ secrets.GITHUB_TOKEN }}
57+
58+
- name: Build and push Docker image
59+
id: push
60+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
61+
with:
62+
context: .
63+
push: true
64+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.nextVersion }}
65+
66+
- name: Create Release with autogenerated release notes
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
run: |
70+
gh release create ${{ github.event.inputs.nextVersion }} \
71+
--generate-notes \
72+
--target ${{ github.sha }}

Dockerfile

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
1-
# use the official Bun image
2-
# see all versions at https://hub.docker.com/r/oven/bun/tags
3-
FROM oven/bun:1.1.45-alpine AS base
1+
# Use the latest LTS version of Node.js
2+
# https://hub.docker.com/_/node
3+
FROM node:22-alpine3.20 AS build-stage
44
WORKDIR /usr/src/app
55

6-
# install dependencies into temp directory
7-
# this will cache them and speed up future builds
8-
FROM base AS install
9-
RUN mkdir -p /temp/dev
10-
COPY package.json bun.lockb /temp/dev/
11-
RUN cd /temp/dev && bun install --frozen-lockfile
6+
# Copy package.json and package-lock.json
7+
COPY package*.json ./
128

13-
# install with --production (exclude devDependencies)
14-
RUN mkdir -p /temp/prod
15-
COPY package.json bun.lockb /temp/prod/
16-
RUN cd /temp/prod && bun install --frozen-lockfile --production
9+
# Install dependencies
10+
RUN npm ci
1711

18-
# copy node_modules from temp directory
19-
# then copy all (non-ignored) project files into the image
20-
FROM base AS build-stage
21-
COPY --from=install /temp/dev/node_modules node_modules
22-
COPY . .
23-
24-
# [optional] tests & build
12+
# Build
2513
ENV NODE_ENV=production
14+
COPY . .
15+
RUN npm run build
2616

27-
RUN bun run build
28-
29-
FROM nginx:1.27.3-alpine-slim
17+
# Use the latest LTS version of Nginx as the serving image
18+
# https://hub.docker.com/_/nginx
19+
FROM nginx:1.27.4-alpine-slim
3020

3121
COPY nginx.conf /etc/nginx/templates/default.conf.template
3222
COPY --from=build-stage /usr/src/app/dist /usr/share/nginx/html

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ UI frontend for @openmcp-project
1010

1111
### Development
1212

13-
1. install dependencies (can also use npm): `bun i`
13+
1. install dependencies: `npm i`
1414

1515
1. Copy the `frontend-config.json` to `public/frontend-config.json` and adapt the `backendUrl` according to your setup (see section Dynamic Frontend Config).
1616

@@ -20,17 +20,17 @@ UI frontend for @openmcp-project
2020

2121
1. Start the application:
2222

23-
Run `bun run dev`
23+
Run `npm run dev`
2424

2525
### Build
2626

2727
1. Build the application:
2828

29-
Run `bun run build`
29+
Run `npm run build`
3030

3131
2. Serve the application locally:
3232

33-
Run `bun run preview`
33+
Run `npm run preview`
3434

3535
3. For production:
3636

0 commit comments

Comments
 (0)