Skip to content

Commit

Permalink
Update core_api CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminbours committed Aug 3, 2024
1 parent 90ffbc9 commit d7b3f3c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push backend image
name: Push core_api image

on:
workflow_dispatch:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Get version
id: package
run: echo "::set-output name=version::$(node -p "require('./back/package.json').version")"
run: echo "::set-output name=version::$(node -p "require('./core_api/package.json').version")"

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -45,12 +45,12 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./back/Dockerfile.back
file: ./core_api/Dockerfile
target: final
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/composite-back:${{ steps.package.outputs.version }},
${{ secrets.DOCKERHUB_USERNAME }}/composite-back:latest
${{ secrets.DOCKERHUB_USERNAME }}/composite-core_api:${{ steps.package.outputs.version }},
${{ secrets.DOCKERHUB_USERNAME }}/composite-core_api:latest
build-args: |
POSTGRES_USER=${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Install, test and build API
name: Install, test and build core_api

# on: [pull_request, workflow_dispatch]
on:
workflow_dispatch:
pull_request:
paths:
- 'back/**'
- 'core_api/**'

jobs:
build:
Expand Down Expand Up @@ -44,16 +44,16 @@ jobs:
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list -w back
run: npm list -w core_api

- name: Install dependencies
run: npm install -w packages -w back && cd back && npx prisma generate
run: npm install -w packages -w core_api && cd core_api && npx prisma generate

- name: Build packages
run: npm run build -w packages

- name: Lint
run: npm run lint -w back
run: npm run lint -w core_api

- name: Build the project
run: npm run build -w back
run: npm run build -w core_api
File renamed without changes.
2 changes: 1 addition & 1 deletion core_api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "composite-back",
"name": "composite-core-api",
"version": "1.0.0-next.21",
"description": "",
"author": "",
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

17 changes: 0 additions & 17 deletions real_time_api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,5 @@ data
.env
.env.hathora
.env.local
<<<<<<< HEAD
.env.staging
.env.production
=======
.env.hathora

# temp directory
.temp
.tmp

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
>>>>>>> 05f656b (real_time_api: Update env variables)

0 comments on commit d7b3f3c

Please sign in to comment.