-
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.
feat: Add workflow for building dashboard image
Creates a new GitHub Actions workflow to build and push the dashboard Docker image on pushes to the main branch. Adds Dockerfile for the dashboard to define the build process. Benefits include automated builds and consistent deployment of the dashboard container.
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 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,47 @@ | ||
name: Build dashboard containers | ||
|
||
env: | ||
DOCKER_REGISTRY: nethermind.jfrog.io | ||
REPO: nubia-docker-local-prod | ||
IMAGE_NAME: p2p-dashboard | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'dashboard/**' | ||
- '.github/workflows/push-dashboard-image.yml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Define image tag | ||
run: | | ||
TAG=$(git describe --tags --always) | ||
echo "DOCKER_IMAGE_TAG=$TAG" >> $GITHUB_ENV | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to registry | ||
run: | | ||
docker login ${{ env.DOCKER_REGISTRY }} -u ${{ secrets.ARTIFACTORY_NUBIA_USERNAME }} -p ${{ secrets.ARTIFACTORY_NUBIA_TOKEN_DEVELOPER}} | ||
- name: Build backend image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./dashboard | ||
file: ./dashboard/backend.Dockerfile | ||
platforms: "linux/amd64" | ||
tags: | | ||
${{ env.DOCKER_REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE_NAME }}:${{ env.DOCKER_IMAGE_TAG }} | ||
${{ env.DOCKER_REGISTRY }}/${{ env.REPO }}/${{ env.IMAGE_NAME }}:latest |
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,9 @@ | ||
FROM node:23-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm install && npm run build | ||
|
||
ENTRYPOINT ["npm", "run", "server"] |