forked from mirrors/claude-code-usage-dashboard
34 lines
979 B
YAML
34 lines
979 B
YAML
name: Build Docker Image
|
||
|
||
on:
|
||
push:
|
||
branches:
|
||
- main
|
||
- deploy
|
||
pull_request:
|
||
branches:
|
||
- main
|
||
- deploy
|
||
workflow_dispatch: {} # 手动触发
|
||
|
||
jobs:
|
||
build-image:
|
||
# 这里的标签要和你 act_runner 的 labels 一致
|
||
# 如果你在 config.yaml 里用的是 ubuntu-latest,就写 ubuntu-latest
|
||
runs-on: ubuntu-latest
|
||
|
||
steps:
|
||
- name: Checkout repository
|
||
uses: https://gitlab.xice.wang/mirrors/actions_checkout.git@v4
|
||
|
||
# 如果你只是要在本机打包镜像,不需要 buildx 和任何登录,直接 docker build 即可
|
||
- name: Build Docker image (local only)
|
||
run: |
|
||
# 镜像名字你可以自行修改,例如 gitea/${GITEA_REPO_NAME}:latest
|
||
IMAGE_NAME="XiaoXice/claude-code-usage-dashboard:latest"
|
||
echo "Building image ${IMAGE_NAME} ..."
|
||
docker build -t "${IMAGE_NAME}" .
|
||
|
||
echo "Built images:"
|
||
docker images "${IMAGE_NAME}"
|