Skip to content

Update Dockerfile

Update Dockerfile #4

name: Build and Push Docker Images
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Verify DockerHub credentials
run: |
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_PASSWORD }}" ]; then
echo "Missing DockerHub credentials"
exit 1
fi
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push diffy-bot-client
uses: docker/build-push-action@v4
with:
context: .
file: solver-bot/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/diffy-bot-client:latest
- name: Build and push diffy-bot-server
uses: docker/build-push-action@v4
with:
context: .
file: solver-common/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/diffy-bot-server:latest