diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..94d1f9ee0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,78 @@ +name: Docker Build Cloud + +on: + push: + +jobs: + engine: + 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-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' }} + 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' }}