From fd66cc9cf3ef7cd1e56c2236e6d7df05d5fff0a7 Mon Sep 17 00:00:00 2001 From: Jiaxin Shan Date: Wed, 16 Oct 2024 16:46:10 -0700 Subject: [PATCH 1/2] Disable docker build github workflow to cut CI cost --- .github/workflows/docker-build-images.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-build-images.yml b/.github/workflows/docker-build-images.yml index 23b9067e..c26a355b 100644 --- a/.github/workflows/docker-build-images.yml +++ b/.github/workflows/docker-build-images.yml @@ -6,6 +6,9 @@ on: jobs: build: + # This prevents the job from running as other steps cover its functionality. + # We use 'if: false' to keep the file for future reference without deleting it. + if: false runs-on: ubuntu-latest steps: - name: Check out code From e80ad36a31436f0b0aa498c1332728754209804c Mon Sep 17 00:00:00 2001 From: Jiaxin Shan Date: Wed, 16 Oct 2024 16:52:03 -0700 Subject: [PATCH 2/2] Push images to Github registry in release pipeline --- .github/workflows/release-build.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-build.yaml b/.github/workflows/release-build.yaml index fd3c63b3..dcddd960 100644 --- a/.github/workflows/release-build.yaml +++ b/.github/workflows/release-build.yaml @@ -24,16 +24,34 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - # Build container images + # Log in to Github Registry + - name: Login to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Build container images with docker registry namespace - name: Build Container Images run: | GIT_COMMIT_HASH=${{ github.ref_name }} make docker-build-all - # Push container image to container registry + # Push container image to DockerHub - name: Push container image to container registry run: | GIT_COMMIT_HASH=${{ github.ref_name }} make docker-push-all + # Build container images with Github registry namespace + - name: Build Container Images with Github Container Registry prefix + run: | + GIT_COMMIT_HASH=${{ github.ref_name }} AIBRIX_CONTAINER_REGISTRY_NAMESPACE=ghcr.io/aibrix make docker-build-all + + # Push container image to Github container registry + - name: Push Container Images to Github Container Registry + run: | + GIT_COMMIT_HASH=${{ github.ref_name }} AIBRIX_CONTAINER_REGISTRY_NAMESPACE=ghcr.io/aibrix make docker-push-all + python-wheel-release: runs-on: ubuntu-latest strategy: