Skip to content

Commit 6724a65

Browse files
committed
Add GitHub Actions workflow for building and pushing Docker images; remove old deploy workflow
1 parent 0051b1b commit 6724a65

File tree

2 files changed

+44
-94
lines changed

2 files changed

+44
-94
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Push Docker Images
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Verify DockerHub credentials
17+
run: |
18+
if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_PASSWORD }}" ]; then
19+
echo "Missing DockerHub credentials"
20+
exit 1
21+
fi
22+
23+
- name: Log in to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
registry: docker.io
27+
username: ${{ secrets.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
29+
30+
- name: Build and push diffy-bot-client
31+
uses: docker/build-push-action@v4
32+
with:
33+
context: .
34+
file: solver-bot/Dockerfile
35+
push: true
36+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/diffy-bot-client:latest
37+
38+
- name: Build and push diffy-bot-server
39+
uses: docker/build-push-action@v4
40+
with:
41+
context: .
42+
file: solver-common/Dockerfile
43+
push: true
44+
tags: ${{ secrets.DOCKERHUB_USERNAME }}/diffy-bot-server:latest

.github/workflows/deploy.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)