Install
openclaw skills install docker-ci-release-pipelineDocker镜像构建测试与GitHub Actions发布全链路流水线,自动构建、测试、安全扫描并推送至镜像仓库
openclaw skills install docker-ci-release-pipeline自动化 Docker 镜像构建、测试、安全扫描与发布全链路流水线。
开发团队需要将应用容器化并通过 GitHub Actions 自动发布到镜像仓库。传统做法需要手动编写 Dockerfile、优化构建、配置 CI、设置安全扫描,流程割裂且容易出错。
本 Combo 编排 docker-expert、github-actions-templates、testing-patterns、github 四个 Skill,一次性完成从镜像优化到自动发布的完整闭环。
Docker构建 或 镜像发布 或 CI/CD
提供待容器化的项目目录结构和语言/框架信息
Dockerfile(多阶段、安全加固)docker-compose.yml(dev/staging/prod 三环境).github/workflows/build-push.yml(完整 CI 工作流)tests/ 或 __tests__/ 目录).dockerignore(构建上下文优化)# 触发条件
on:
push:
branches: [main]
pull_request:
branches: [main]
tags: ['v*']
# 流程:Checkout → Setup Buildx → Build & Test → Security Scan → Push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build --target production -t app:${{ github.sha }} .
- name: Run tests in container
run: docker run --rm app:${{ github.sha }} npm test
- name: Security scan
uses: aquasecurity/trivy-action@master
- name: Push to registry
if: github.ref == 'refs/heads/main'
run: docker push ghcr.io/${{ github.repository }}:${{ github.sha }}