Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
docker push ${{ vars.BACKEND_ECR_URI }}:latest

- name: Update Lambda
run: aws lambda update-function-code --function-name allergy-detect-backend --image-uri ${{ AWS_LAMBDA_BACKEND_IMAGE_URI }}
run: aws lambda update-function-code --function-name allergy-detect-backend --image-uri ${{ secrets.AWS_LAMBDA_BACKEND_IMAGE_URI }}
# Shouldn't have all this hard coded but it's fine for now

24 changes: 13 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ on:
- main

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

- name: Build Docker image
run: docker build ./backend

#- name: Start backend
# run: nohup npm start --prefix backend > /dev/null 2>&1 &

changes:
runs-on: ubuntu-latest
outputs:
Expand All @@ -33,6 +22,19 @@ jobs:
backend:
- 'backend/**'

build:
needs: changes
if: needs.changes.outputs.backend == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build Docker image
run: docker build ./backend

#- name: Start backend
# run: nohup npm start --prefix backend > /dev/null 2>&1 &

test-backend:
needs: changes
if: needs.changes.outputs.backend == 'true'
Expand Down
Loading