Skip to content

Dispatch on main push #2

Dispatch on main push

Dispatch on main push #2

Workflow file for this run

name: Build and publish Docker image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: build image
run: docker build -t mohamedshawky/react-test -f ./client/Dockerfile.dev ./client
- name: test image
run: docker run -e CI=true mohamedshawky/react-test npm test -- --coverage
- name: build and push images
run: |
docker build -t mohamedshawky/multi-client ./client
docker build -t mohamedshawky/multi-nginx ./nginx
docker build -t mohamedshawky/multi-server ./server
docker build -t mohamedshawky/multi-worker ./worker
docker login -u mohamedshawky -p ${{ secrets.DOCKER_HUB_TOKEN }}
docker push mohamedshawky/multi-client
docker push mohamedshawky/multi-nginx
docker push mohamedshawky/multi-server
docker push mohamedshawky/multi-worker