Skip to content

Commit

Permalink
ci: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Spanos committed Feb 23, 2024
1 parent a024608 commit 0e085cb
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 85 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-and-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-ui:${{ github.ref_name }},${{ secrets.REPOSITORY_NAME }}/ppo-ui:stable
context: ./src/ui
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
secrets: |
npmrc=${{ secrets.NPMRC }}
build-calc-odds-api:
needs: test
runs-on: ubuntu-22.04
Expand All @@ -55,8 +55,8 @@ jobs:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-calc-odds:${{ github.ref_name }},${{ secrets.REPOSITORY_NAME }}/ppo-calc-odds:stable
context: ./src/calc-odds-api
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
secrets: |
npmrc=${{ secrets.NPMRC }}
build-web-api:
needs: test
runs-on: ubuntu-22.04
Expand All @@ -74,8 +74,8 @@ jobs:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-api:${{ github.ref_name }},${{ secrets.REPOSITORY_NAME }}/ppo-api:stable
context: ./src/web-api
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
secrets: |
npmrc=${{ secrets.NPMRC }}
migrate-db:
needs: [build-client-ui, build-web-api, build-calc-odds-api]
runs-on: ubuntu-22.04
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/calc-odds-api.latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-calc-odds:latest
context: ./src/calc-odds-api
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
secrets: |
npmrc=${{ secrets.NPMRC }}
4 changes: 2 additions & 2 deletions .github/workflows/client-ui-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ jobs:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-ui:latest
context: ./src/ui
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
secrets: |
npmrc=${{ secrets.NPMRC }}
4 changes: 2 additions & 2 deletions .github/workflows/web-api-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/ppo-api:latest
context: ./src/web-api
build-args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
secrets: |
npmrc=${{ secrets.NPMRC }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
postgres-data
npm_token
.scannerwork
.scannerwork
.npmrc
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ Code of this repo is found inside the `src` folder. This folder includes the fol

- Make sure you have [docker installed](https://docs.docker.com/desktop/)
- This project you need access to a private npm registry. Ask the org admin for an npm token that reads from this registry.
- Create a file called `npm_token` at the project root. Copy the token in the `npm_token` file.
- Run `run.sh` script.
18 changes: 0 additions & 18 deletions install.sh

This file was deleted.

14 changes: 7 additions & 7 deletions src/calc-odds-api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/calc-odds-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@moby-it/poker-core": "^2.1.1",
"@moby-it/poker-core": "^2.1.3",
"body-parser": "^1.20.0",
"chalk": "^5.2.0",
"cors": "^2.8.5",
Expand Down
9 changes: 3 additions & 6 deletions src/ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# build environment
FROM node:18.13.0-alpine as dependencies
FROM node:20.11.0-alpine as dependencies
WORKDIR /app
ARG NPM_TOKEN
COPY package*.json decorate-angular-cli.js .npmrc ./
RUN npm ci -f
RUN rm -f .npmrc

COPY package*.json decorate-angular-cli.js ./
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm ci -f

FROM dependencies as build
ARG TARGET=prod
Expand Down
155 changes: 116 additions & 39 deletions src/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e085cb

Please sign in to comment.