mirror of
https://github.com/AppFlowy-IO/AppFlowy-Cloud.git
synced 2025-04-19 03:24:42 -04:00
chore: ci that build test image (#1314)
This commit is contained in:
parent
89244a2a79
commit
9612d676ac
1 changed files with 152 additions and 0 deletions
152
.github/workflows/build_test_docker_image.yaml
vendored
Normal file
152
.github/workflows/build_test_docker_image.yaml
vendored
Normal file
|
@ -0,0 +1,152 @@
|
|||
name: Manually Build All Docker Images
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch to build from"
|
||||
required: true
|
||||
default: "main"
|
||||
debug_version:
|
||||
description: "Release version tag (e.g. v1.0.0)"
|
||||
required: true
|
||||
archs:
|
||||
description: "Target architectures (comma separated), e.g. linux/amd64,linux/arm64"
|
||||
required: false
|
||||
default: "linux/amd64"
|
||||
|
||||
jobs:
|
||||
gotrue:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
|
||||
- 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 Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push GoTrue image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./docker/gotrue
|
||||
file: Dockerfile
|
||||
platforms: ${{ github.event.inputs.archs }}
|
||||
push: true
|
||||
tags: |
|
||||
appflowyinc/gotrue:${{ github.event.inputs.debug_version }}-test
|
||||
|
||||
- name: Logout from Docker Hub
|
||||
if: always()
|
||||
run: docker logout
|
||||
|
||||
appflowy_cloud:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
|
||||
- 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 Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push AppFlowy Cloud image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ github.event.inputs.archs }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_HUB_USERNAME }}/appflowy_cloud:${{ github.event.inputs.debug_version }}-test
|
||||
|
||||
- name: Logout from Docker Hub
|
||||
if: always()
|
||||
run: docker logout
|
||||
|
||||
admin_frontend:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
|
||||
- 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 Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push Admin Frontend image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./admin_frontend/Dockerfile
|
||||
platforms: ${{ github.event.inputs.archs }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_HUB_USERNAME }}/admin_frontend:${{ github.event.inputs.debug_version }}-test
|
||||
|
||||
- name: Logout from Docker Hub
|
||||
if: always()
|
||||
run: docker logout
|
||||
|
||||
appflowy_worker:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
|
||||
- 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 Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push AppFlowy Worker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./services/appflowy-worker/Dockerfile
|
||||
platforms: ${{ github.event.inputs.archs }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKER_HUB_USERNAME }}/appflowy_worker:${{ github.event.inputs.debug_version }}-test
|
||||
|
||||
- name: Logout from Docker Hub
|
||||
if: always()
|
||||
run: docker logout
|
Loading…
Add table
Reference in a new issue