diff --git a/.github/workflows/myothertest.yml b/.github/workflows/myothertest.yml index 65fa7965..a1925f1e 100644 --- a/.github/workflows/myothertest.yml +++ b/.github/workflows/myothertest.yml @@ -8,6 +8,165 @@ on: branches: [testme-docker] jobs: + build-amd64-slim: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (amd64-slim) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (amd64-slim) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/amd64 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-slim \ + --push \ + . + + build-arm64-slim: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (arm64-slim) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (arm64-slim) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm64 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \s + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-slim \ + --push \ + . + + build-armv7-slim: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv7-slim) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv7-slim) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v7 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-slim \ + --push \ + . + + build-armv6-slim: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv6-slim) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv6-slim) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v6 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-slim \ + --push \ + . translate: runs-on: ubuntu-latest name: Run Translations @@ -43,35 +202,151 @@ jobs: path: . - build-amd64: + + build-amd64-mongodb: runs-on: ubuntu-latest needs: translate - name: Build Docker Image (linux/amd64) + name: Build Docker Image (amd64-mongodb) 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (amd64-mongodb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/amd64 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-mongodb \ + --push \ + . - - name: Build and push Docker image (amd64) + build-amd64-postgresql: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (amd64-postgresql) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (amd64-postgresql) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/amd64 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-postgresql \ + --push \ + . + + build-amd64-mariadb: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (amd64-mariadb) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (amd64-mariadb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/amd64 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --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 \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-mariadb \ + --push \ + . + + build-amd64-all: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (amd64-all) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (amd64-all) run: | REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" docker buildx build \ @@ -89,35 +364,151 @@ jobs: . - build-arm64: + + build-arm64-mongodb: runs-on: ubuntu-latest needs: translate - name: Build Docker Image (linux/arm64) + name: Build Docker Image (arm64-mongodb) 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (arm64-mongodb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm64 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-mongodb \ + --push \ + . - - name: Build and push Docker image (arm64) + build-arm64-postgresql: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (arm64-postgresql) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (arm64-postgresql) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm64 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-postgresql \ + --push \ + . + + build-arm64-mariadb: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (arm64-mariadb) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (arm64-mariadb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm64 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --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 \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-mariadb \ + --push \ + . + + build-arm64-all: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (arm64-all) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (arm64-all) run: | REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" docker buildx build \ @@ -135,35 +526,151 @@ jobs: . - build-armv7: + + build-armv7-mongodb: runs-on: ubuntu-latest needs: translate - name: Build Docker Image (linux/arm/v7) + name: Build Docker Image (armv7-mongodb) 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv7-mongodb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v7 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-mongodb \ + --push \ + . - - name: Build and push Docker image (arm/v7) + build-armv7-postgresql: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv7-postgresql) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv7-postgresql) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v7 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-postgresql \ + --push \ + . + + build-armv7-mariadb: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv7-mariadb) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv7-mariadb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v7 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --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 \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-mariadb \ + --push \ + . + + build-armv7-all: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv7-all) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv7-all) run: | REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" docker buildx build \ @@ -181,35 +688,151 @@ jobs: . - build-armv6: + + build-armv6-mongodb: runs-on: ubuntu-latest needs: translate - name: Build Docker Image (linux/arm/v6) + name: Build Docker Image (armv6-mongodb) 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv6-mongodb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v6 \ + --build-arg INCLUDE_MONGODB_TOOLS=YES \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-mongodb \ + --push \ + . - - name: Build and push Docker image (arm/v6) + build-armv6-postgresql: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv6-postgresql) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv6-postgresql) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v6 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=YES \ + --build-arg INCLUDE_MARIADB_TOOLS=NO \ + --build-arg DISABLE_MINIFY=yes \ + --build-arg DISABLE_TRANSLATE=yes \ + --build-arg DISABLE_EXTRACT=yes \ + --build-arg PREINSTALL_LIBS=true \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-postgresql \ + --push \ + . + + build-armv6-mariadb: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv6-mariadb) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv6-mariadb) + run: | + REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + docker buildx build \ + --platform linux/arm/v6 \ + --build-arg INCLUDE_MONGODB_TOOLS=NO \ + --build-arg INCLUDE_POSTGRESQL_TOOLS=NO \ + --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 \ + -f docker/Dockerfile \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-mariadb \ + --push \ + . + + build-armv6-all: + runs-on: ubuntu-latest + needs: translate + name: Build Docker Image (armv6-all) + 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.MY_TOKEN || secrets.GITHUB_TOKEN }} + - name: Build and push Docker image (armv6-all) run: | REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" docker buildx build \ @@ -229,53 +852,72 @@ jobs: merge-manifest: runs-on: ubuntu-latest - needs: [build-amd64, build-arm64, build-armv7, build-armv6] + needs: + - build-amd64-mongodb + - build-arm64-mongodb + - build-armv7-mongodb + - build-armv6-mongodb + - build-amd64-postgresql + - build-arm64-postgresql + - build-armv7-postgresql + - build-armv6-postgresql + - build-amd64-mariadb + - build-arm64-mariadb + - build-armv7-mariadb + - build-armv6-mariadb + - build-amd64-all + - build-arm64-all + - build-armv7-all + - build-armv6-all + - build-amd64-slim + - build-arm64-slim + - build-armv7-slim + - build-armv6-slim name: Create and Push Multi-Arch Manifest steps: - 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.repository_owner }} password: ${{ secrets.MY_TOKEN || secrets.GITHUB_TOKEN }} - - - name: Create and push multi-arch manifest + - name: Create and push multi-arch manifests for all variants run: | REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" + # mongodb + docker buildx imagetools create \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-mongodb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-mongodb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-mongodb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-mongodb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-mongodb + # postgresql + docker buildx imagetools create \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-postgresql \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-postgresql \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-postgresql \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-postgresql \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-postgresql + # mariadb + docker buildx imagetools create \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-mariadb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-mariadb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-mariadb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-mariadb \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-mariadb + # all (no suffix) docker buildx imagetools create \ -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }} \ ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64 \ ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64 \ ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7 \ ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6 - - - name: Get arch-specific package version IDs - id: get_arch_ids - run: | - REPO_OWNER_LC="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" - GHCR_REPO="$REPO_OWNER_LC/meshcentral" - TAGS=(amd64 arm64 armv7 armv6) - ids="" - for arch in "${TAGS[@]}"; do - tag="${{ github.ref_name }}-$arch" - resp=$(curl -s -H "Authorization: Bearer ${{ secrets.MY_TOKEN || secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/orgs/${REPO_OWNER_LC}/packages/container/meshcentral/versions?per_page=100") - id=$(echo "$resp" | jq -r ".[] | select(.metadata.container.tags[]? == \"$tag\") | .id" | head -n1) - if [ -n "$id" ]; then - ids+="$id " - fi - done - echo "ids=$ids" >> $GITHUB_OUTPUT - env: - GH_TOKEN: ${{ secrets.MY_TOKEN || secrets.GITHUB_TOKEN }} - - - name: Delete arch-specific package versions - uses: actions/delete-package-versions@v5 - with: - package-name: 'meshcentral' - package-type: 'container' - token: ${{ secrets.MY_TOKEN || secrets.GITHUB_TOKEN }} - version-ids: ${{ steps.get_arch_ids.outputs.ids }} + # slim + docker buildx imagetools create \ + -t ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-slim \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-amd64-slim \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-arm64-slim \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv7-slim \ + ghcr.io/$REPO_OWNER_LC/meshcentral:${{ github.ref_name }}-armv6-slim