From 447df1af8848e2251ac23f5cd0e097441beafa1e Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Mon, 9 Dec 2024 22:50:57 +0800 Subject: [PATCH 1/4] Add docker build cloud yaml Signed-off-by: Quanyi Ma --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..6c6d531fc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: Docker Build Cloud + +on: + push: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKER_USER }} + password: ${{ secrets.DOCKER_PAT }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + version: "lab:mono-engine-latest" + driver: cloud + endpoint: "${{ vars.DOCKER_USER }}/mono" + install: true + - name: Build and push + uses: docker/build-push-action@v6 + with: + tags: "${{ vars.DOCKER_USER }}/mono:mono-engine-latest" + # For pull requests, export results to the build cache. + # Otherwise, push to a registry. + outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} From e6d46260f793456b0eb29d8084cd2964359ca99b Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Mon, 9 Dec 2024 22:57:16 +0800 Subject: [PATCH 2/4] Fix docker cloud build error Signed-off-by: Quanyi Ma --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c6d531fc..faacb6aea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: - version: "lab:mono-engine-latest" + version: "lab:latest" driver: cloud endpoint: "${{ vars.DOCKER_USER }}/mono" install: true From fc437b2f200bab3a12df1795dfb39a0ce7fcb0da Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Mon, 9 Dec 2024 23:11:44 +0800 Subject: [PATCH 3/4] Add Dockerfile path in build.yml Signed-off-by: Quanyi Ma --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index faacb6aea..704fc15c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,13 @@ jobs: version: "lab:latest" driver: cloud endpoint: "${{ vars.DOCKER_USER }}/mono" + platforms: linux/amd64,linux/arm64 install: true - name: Build and push uses: docker/build-push-action@v6 with: tags: "${{ vars.DOCKER_USER }}/mono:mono-engine-latest" + file: docker/mono-engine-dockerfile # For pull requests, export results to the build cache. # Otherwise, push to a registry. outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} From fc0ec4f5cfe70d870a82cdfbf3d566088c176e89 Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Mon, 9 Dec 2024 23:31:09 +0800 Subject: [PATCH 4/4] Add pg and ui to Dockerfile Signed-off-by: Quanyi Ma --- .github/workflows/build.yml | 50 ++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 704fc15c9..94d1f9ee0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: jobs: - docker: + engine: runs-on: ubuntu-latest steps: - name: Log in to Docker Hub @@ -28,3 +28,51 @@ jobs: # For pull requests, export results to the build cache. # Otherwise, push to a registry. outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} + postgres: + runs-on: ubuntu-latest + steps: + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKER_USER }} + password: ${{ secrets.DOCKER_PAT }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + version: "lab:latest" + driver: cloud + endpoint: "${{ vars.DOCKER_USER }}/mono" + platforms: linux/amd64,linux/arm64 + install: true + - name: Build and push + uses: docker/build-push-action@v6 + with: + tags: "${{ vars.DOCKER_USER }}/mono:mono-pg-latest" + file: docker/mono-pg-dockerfile + # For pull requests, export results to the build cache. + # Otherwise, push to a registry. + outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} + ui: + runs-on: ubuntu-latest + steps: + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKER_USER }} + password: ${{ secrets.DOCKER_PAT }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + version: "lab:latest" + driver: cloud + endpoint: "${{ vars.DOCKER_USER }}/mono" + platforms: linux/amd64,linux/arm64 + install: true + - name: Build and push + uses: docker/build-push-action@v6 + with: + tags: "${{ vars.DOCKER_USER }}/mono:mono-ui-latest" + file: docker/mono-ui-dockerfile + # For pull requests, export results to the build cache. + # Otherwise, push to a registry. + outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }}