feat(Dockerfiles): update npm install command to include all dependen… #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push Docker Images | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build_and_push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Log in to GitHub Container Registry | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and push backend image | |
| run: | | |
| docker build ./backend --tag ghcr.io/${{ github.repository_owner }}/task-board:backend-latest | |
| docker push ghcr.io/${{ github.repository_owner }}/task-board:backend-latest | |
| - name: Build and push frontend image | |
| run: | | |
| docker build ./frontend --build-arg VITE_API_BASE_URL= --tag ghcr.io/${{ github.repository_owner }}/task-board:frontend-latest | |
| docker push ghcr.io/${{ github.repository_owner }}/task-board:frontend-latest |