Skip to content

Update ProductResponse Schema & Display sale price #63

Update ProductResponse Schema & Display sale price

Update ProductResponse Schema & Display sale price #63

name: Build and Push Docker Images
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- context: backend
dockerfile: backend/Dockerfile
image_name: julianlechner/ecommerce-backend
- context: frontend
dockerfile: frontend/Dockerfile
image_name: julianlechner/ecommerce-frontend
- context: nginx
dockerfile: nginx/Dockerfile
image_name: julianlechner/ecommerce-nginx
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.context }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.context }}-
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ matrix.image_name }}:latest
platforms: linux/amd64, linux/arm64
cache-from: type=registry,ref=${{ matrix.image_name }}:cache
cache-to: type=inline,mode=max
- name: Verify the images
run: docker images