Skip to content

update deployments to use GH docker images (#6) #4

update deployments to use GH docker images (#6)

update deployments to use GH docker images (#6) #4

name: Build and Push Docker Images
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
image-folder:
- order-processor
- stock-controller
- warehouse-interface
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker Image
uses: docker/build-push-action@v5.0.0
with:
context: ./${{ matrix.image-folder }}
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.image-folder }}:latest
labels: ${{ steps.meta.outputs.labels}}
push: true