Skip to content

Commit

Permalink
Push images to Github registry in release pipeline (#301)
Browse files Browse the repository at this point in the history
* Disable docker build github workflow to cut CI cost

* Push images to Github registry in release pipeline
  • Loading branch information
Jeffwan authored Oct 17, 2024
1 parent 4beddf7 commit 361ed1f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker-build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 361ed1f

Please sign in to comment.