Skip to content

ci: 配置 GitHub Actions 自动构建并推送 Docker 镜像 #1

ci: 配置 GitHub Actions 自动构建并推送 Docker 镜像

ci: 配置 GitHub Actions 自动构建并推送 Docker 镜像 #1

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 1. 拉取最新代码
uses: actions/checkout@v4
- name: 2. 登录到 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: 3. 构建并推送镜像
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/WaveBypass:latest