From c928b8f85f0e433a0b150ce738258110665249c8 Mon Sep 17 00:00:00 2001 From: Nick Hale <4175918+njhale@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:22:22 -0500 Subject: [PATCH] chore: build and publish enterprise images Add a GitHub workflow step to build and publish enterprise images to ghcr.io on push to main and tags. Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com> --- .github/workflows/docker-build-and-push.yml | 23 +++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-and-push.yml b/.github/workflows/docker-build-and-push.yml index 904af44cd..d90c1aba7 100644 --- a/.github/workflows/docker-build-and-push.yml +++ b/.github/workflows/docker-build-and-push.yml @@ -42,7 +42,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push Docker image + - name: Build and push OSS Docker image uses: depot/build-push-action@v1 with: project: bbqjs4tj1g @@ -53,15 +53,34 @@ jobs: ${{ github.ref_type == 'tag' && !contains(github.ref_name, '-rc') && format('docker.io/obot/{0}:{1}', github.event.repository.name, github.ref_name) || '' }} platforms: linux/amd64,linux/arm64 + - name: Build and push enterprise Docker image + uses: depot/build-push-action@v1 + with: + project: bbqjs4tj1g + context: . + push: true + secrets: | + "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" + build-args: | + TOOL_REGISTRY_REPOS='github.com/obot-platform/tools,github.com/obot-platform/enterprise-tools' + tags: | + ghcr.io/${{ github.repository }}-enterprise:${{ github.ref_name }} + platforms: linux/amd64,linux/arm64 + - name: Setup crane uses: imjasonh/setup-crane@v0.4 - - name: Copy to latest tag + - name: Copy OSS image to latest tag if: ${{ github.ref_type == 'tag' && !contains(github.ref_name, '-rc') }} run: | crane tag ghcr.io/${{ github.repository }}:${{ github.ref_name }} latest crane tag docker.io/obot/${{ github.event.repository.name }}:${{ github.ref_name }} latest + - name: Copy Enterprise image to latest tag + if: ${{ github.ref_type == 'tag' && !contains(github.ref_name, '-rc') }} + run: | + crane tag ghcr.io/${{ github.repository }}-enterprise:${{ github.ref_name }} latest + - name: Deploy to Test Render if: ${{ env.DEPLOY_TO_TEST == 'true' }} uses: joelwmale/webhook-action@2.4.1