feat: add Docker setup with deployment instructions and GitHub Action… #1
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 --tag ghcr.io/${{ github.repository_owner }}/task-board:frontend-latest | |
| docker push ghcr.io/${{ github.repository_owner }}/task-board:frontend-latest |