From 1e0e0847da1f7a24afe45d102b35ff7bdb6cba7d Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Sun, 26 Oct 2025 10:34:35 +0000 Subject: [PATCH] my new test with ai help Signed-off-by: Simon Smith --- .github/workflows/myothertest.yml | 219 ++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 .github/workflows/myothertest.yml diff --git a/.github/workflows/myothertest.yml b/.github/workflows/myothertest.yml new file mode 100644 index 00000000..5295c890 --- /dev/null +++ b/.github/workflows/myothertest.yml @@ -0,0 +1,219 @@ +# GitHub Actions workflow: Translate then build Docker images for multiple platforms +name: Translate and Multi-Platform Docker Build + +on: + push: + branches: [testme-docker] + pull_request: + branches: [testme-docker] + +jobs: + translate: + runs-on: ubuntu-latest + name: Run Translations + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js (LTS) + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Run translate.js (ignore errors) + run: node translate.js || true + working-directory: translate + + - name: Run translate extractall + run: node translate extractall + working-directory: translate + + - name: Run translate.js minifyall + run: node translate.js minifyall + working-directory: translate + + - name: Run translate.js translateall + run: node translate.js translateall + working-directory: translate + + - name: Upload repo with translations + uses: actions/upload-artifact@v4 + with: + name: repo-with-translations + path: . + + + build-amd64: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (linux/amd64) + steps: + - name: Download repo artifact + uses: actions/download-artifact@v4 + with: + name: repo-with-translations + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up Node.js (LTS) + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image (amd64) + run: | + docker buildx build \ + --platform linux/amd64 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=YES \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -t ghcr.io/${{ github.repository_owner }}/meshcentral:${{ github.ref_name }} \ + --push \ + ./docker + + + build-arm64: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (linux/arm64) + steps: + - name: Download repo artifact + uses: actions/download-artifact@v4 + with: + name: repo-with-translations + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up Node.js (LTS) + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image (arm64) + run: | + docker buildx build \ + --platform linux/arm64 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=YES \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -t ghcr.io/${{ github.repository_owner }}/meshcentral:${{ github.ref_name }} \ + --push \ + ./docker + + + build-armv7: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (linux/arm/v7) + steps: + - name: Download repo artifact + uses: actions/download-artifact@v4 + with: + name: repo-with-translations + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up Node.js (LTS) + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image (arm/v7) + run: | + docker buildx build \ + --platform linux/arm/v7 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=YES \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -t ghcr.io/${{ github.repository_owner }}/meshcentral:${{ github.ref_name }} \ + --push \ + ./docker + + + build-armv6: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (linux/arm/v6) + steps: + - name: Download repo artifact + uses: actions/download-artifact@v4 + with: + name: repo-with-translations + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up Node.js (LTS) + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image (arm/v6) + run: | + docker buildx build \ + --platform linux/arm/v6 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=YES \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -t ghcr.io/${{ github.repository_owner }}/meshcentral:${{ github.ref_name }} \ + --push \ + ./docker