diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 13f9b57..108bf28 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -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 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4ddd56c..33fd9e2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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'