Skip to content

Commit

Permalink
ci: 💚 Add CI configs
Browse files Browse the repository at this point in the history
  • Loading branch information
b2r66sun committed Jan 2, 2025
1 parent 43a8068 commit 01b3c10
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Push Docker Image

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Step 3: Build the Docker image
- name: Build Docker image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/wechat-bot:latest .
# Step 4: Push the Docker image to Docker Hub
- name: Push Docker image
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/wechat-bot:latest

0 comments on commit 01b3c10

Please sign in to comment.