add wechat channel #34
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Build & Publish | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=raw,value=latest | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Package Docker distribution | |
| run: | | |
| mkdir -p dist/comobot-docker | |
| cp docker-compose.yml dist/comobot-docker/ | |
| cp docker/start.command dist/comobot-docker/ | |
| cp docker/start.bat dist/comobot-docker/ | |
| cat > dist/comobot-docker/README.txt <<'EOF' | |
| Comobot - Docker Distribution | |
| ============================== | |
| Requirements: Docker Desktop (https://www.docker.com/products/docker-desktop/) | |
| Quick Start: | |
| macOS: Double-click start.command | |
| Windows: Double-click start.bat | |
| The browser will open automatically at http://localhost:18790 | |
| Follow the setup wizard to configure Comobot. | |
| To stop: docker compose down | |
| EOF | |
| chmod +x dist/comobot-docker/start.command | |
| cd dist && zip -r comobot-docker.zip comobot-docker/ | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/comobot-docker.zip | |
| generate_release_notes: true |