Skip to content

feat: add Docker setup with deployment instructions and GitHub Action… #1

feat: add Docker setup with deployment instructions and GitHub Action…

feat: add Docker setup with deployment instructions and GitHub Action… #1

Workflow file for this run

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