This repository was archived by the owner on May 6, 2026. It is now read-only.
chore(ci): add docker build workflow #1
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: Build and Push Docker Images | |
| on: | |
| push: | |
| branches: [ main, leafd/launch ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ghcr.io/${{ github.repository }}/mail-service | |
| ghcr.io/${{ github.repository }}/user-service | |
| ghcr.io/${{ github.repository }}/lark-ui | |
| ghcr.io/${{ github.repository }}/gateway | |
| tags: | | |
| type=ref,event=branch | |
| type=sha,prefix={{branch}}- | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push owl-api mail-service | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./owl-api/mail-service/Dockerfile | |
| tags: ghcr.io/${{ github.repository }}/mail-service:latest,ghcr.io/${{ github.repository }}/mail-service:${{ github.sha }} | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push owl-api user-service | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./owl-api/user-service/Dockerfile | |
| tags: ghcr.io/${{ github.repository }}/user-service:latest,ghcr.io/${{ github.repository }}/user-service:${{ github.sha }} | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push lark-ui | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./lark-ui/Dockerfile | |
| tags: ghcr.io/${{ github.repository }}/lark-ui:latest,ghcr.io/${{ github.repository }}/lark-ui:${{ github.sha }} | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Build and push gateway | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./gateway/Dockerfile | |
| tags: ghcr.io/${{ github.repository }}/gateway:latest,ghcr.io/${{ github.repository }}/gateway:${{ github.sha }} | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |