Skip to content

updated

updated #2

Workflow file for this run

name: Build and Push Docker Images
on:
push:
branches:
- main
paths:
- "app/**"
- ".github/workflows/docker-build.yml"
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push backend image
uses: docker/build-push-action@v6
with:
context: ./app/backend
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/taskops-backend:${{ github.sha }}
- name: Build and push frontend image
uses: docker/build-push-action@v6
with:
context: ./app/frontend
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/taskops-frontend:latest
${{ secrets.DOCKERHUB_USERNAME }}/taskops-frontend:${{ github.sha }}