Skip to content

Commit

Permalink
[CI] Set up docker nightly build (#114)
Browse files Browse the repository at this point in the history
* Set up docker nightly build

* Updated `lintstaged` config and ran `prettier`

* test workflow

* Updated Dockerfile

* Updated `deploy` workflow

* Updated `build_docker_nightly` workflow

* Updated Dockerfile

* Updated `build_docker_nightly` workflow file

* Updated `build docker nightly` workflow

* Updated `deploy` workflow

* Removed `maint-113` branch from workflo config file
  • Loading branch information
rmanaem authored Apr 11, 2024
1 parent 7ba65bf commit efc9358
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build_docker_nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build docker nightly

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/query_tool:nightly
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
echo -e "NB_API_QUERY_URL=${{ vars.NB_API_QUERY_URL }}\nNB_IS_FEDERATION_API=${{ vars.NB_IS_FEDERATION_API }}" > .env
- name: Install dependencies
run: npm ci
run: npm ci --omit=dev --ignore-scripts
- name: Build
run: npm run build
- name: Setup Pages
Expand Down
3 changes: 2 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"*.{ts,tsx}": ["npm run lint:check", "npm run format:check"]
"*.{ts,tsx}": ["npm run lint:check"],
"*": ["npm run format:check"]
}
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ FROM node:20

WORKDIR /app

COPY package*.json .

RUN npm ci

COPY . .

RUN npm ci --omit=dev --ignore-scripts

EXPOSE 5173

ENTRYPOINT npm run build && npm run preview

0 comments on commit efc9358

Please sign in to comment.