update
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: Build Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- <分支名>
|
||||
paths:
|
||||
- 'Dockerfile*'
|
||||
- 'requirements.txt'
|
||||
- '.gitea/workflows/build-images.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: <分支名>
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
echo "====== 开始构建 Docker 镜像 ======"
|
||||
docker build \
|
||||
-t <image_name>:<version> \
|
||||
-f Dockerfile \
|
||||
.
|
||||
|
||||
echo "====== 验证镜像 ======"
|
||||
docker image inspect <image_name>:<version>
|
||||
|
||||
echo "✓ 构建完成"
|
||||
|
||||
Reference in New Issue
Block a user