-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(dashboard): publish dashboard next image
- Loading branch information
Showing
8 changed files
with
149 additions
and
3 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
!lhctl/ | ||
!docker/ | ||
!dashboard/ | ||
!dashboard-new/ | ||
!gradle.properties | ||
!settings.gradle | ||
!go.mod | ||
|
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,98 @@ | ||
name: dashboard | ||
run-name: Publishing images | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "dashboard" | ||
paths: | ||
- .github/workflows/dashboard.yml | ||
- server/** | ||
- dashboard-new/** | ||
- docker/standalone/** | ||
permissions: | ||
id-token: write | ||
contents: read | ||
jobs: | ||
lh-server: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "corretto" | ||
java-version: 17 | ||
|
||
- name: Tests and Build | ||
run: ./gradlew server:build | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: server-jar | ||
path: server/build/libs/server-*-all.jar | ||
|
||
lh-dashboard-next: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Build and Publish | ||
uses: ./.github/actions/publish-image | ||
with: | ||
image-name: lh-dashboard-next | ||
dockerfile: dashboard-new/Dockerfile | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
context: ./dashboard-new | ||
|
||
lh-standalone: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lh-server | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
package_json_file: ./dashboard/package.json | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache-dependency-path: dashboard/pnpm-lock.yaml | ||
cache: pnpm | ||
|
||
- name: Build Dashboard | ||
working-directory: ./dashboard | ||
run: | | ||
pnpm install | ||
pnpm build | ||
- name: Build Dashboard-new | ||
working-directory: ./dashboard-new | ||
run: | | ||
npm ci | ||
npm build | ||
- name: Dowload Server Jar artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: server-jar | ||
path: server/build/libs/ | ||
|
||
- name: Build and Publish | ||
uses: ./.github/actions/publish-image | ||
with: | ||
image-name: lh-standalone-next | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: docker/standalone/Dockerfile |
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,34 @@ | ||
FROM node:alpine AS base | ||
|
||
FROM base as deps | ||
RUN apk add --no-cache libc6-compat | ||
WORKDIR /app | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm ci | ||
|
||
FROM base as builder | ||
WORKDIR /app | ||
COPY --from=deps /app/node_modules ./ | ||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
FROM base as runner | ||
ENV NODE_ENV production | ||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 nextjs | ||
|
||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/public ./public | ||
|
||
RUN mkdir .next | ||
RUN chown nextjs:nodejs .next | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static | ||
|
||
USER nextjs | ||
EXPOSE 3000 | ||
ENV PORT 3000 | ||
|
||
CMD HOSTNAME="0.0.0.0" node server.js |
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
5 changes: 2 additions & 3 deletions
5
dashboard-new/src/app/(authenticated)/externalEventDef/[name]/components/Details.tsx
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
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
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
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