Skip to content

Change helm repository from S3 to ECR (#95) #74

Change helm repository from S3 to ECR (#95)

Change helm repository from S3 to ECR (#95) #74

Workflow file for this run

name: CI-post-merge
on:
push:
branches:
- main
permissions:
# This is necessary for AWS credentials. See:
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
id-token: write
contents: write
jobs:
re-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Re-test
run: make test
update-tag:
runs-on: ubuntu-latest
needs:
- re-test
outputs:
new_version: ${{ steps.tag_version.outputs.new_version }}
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: minor
docker-build:
runs-on: ubuntu-latest
needs:
- update-tag
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::803339316953:role/github-actions-ecr-push-llm-operators
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build, tag, and push loader to Amazon ECR
uses: docker/build-push-action@v5
with:
file: ./build/loader/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
public.ecr.aws/v8n3t7y5/llm-operator/model-manager-loader:${{ needs.update-tag.outputs.new_version }}
public.ecr.aws/v8n3t7y5/llm-operator/model-manager-loader:latest
- name: Build, tag, and push server to Amazon ECR
uses: docker/build-push-action@v5
with:
file: ./build/server/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
public.ecr.aws/v8n3t7y5/llm-operator/model-manager-server:${{ needs.update-tag.outputs.new_version }}
public.ecr.aws/v8n3t7y5/llm-operator/model-manager-server:latest
publish-helm-chart:
runs-on: ubuntu-latest
needs:
- update-tag
- docker-build
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::803339316953:role/github-actions-ecr-push-llm-operators
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Set up Helm
uses: Azure/setup-helm@v4
- name: build and push loader helm chart
run: |
helm package --version ${{ needs.update-tag.outputs.new_version }} ./deployments/loader
helm push model-manager-loader-${{ needs.update-tag.outputs.new_version }}.tgz oci://public.ecr.aws/v8n3t7y5/llm-operator-charts
- name: build and push server helm chart
run: |
helm package --version ${{ needs.update-tag.outputs.new_version }} ./deployments/server
helm push model-manager-server-${{ needs.update-tag.outputs.new_version }}.tgz oci://public.ecr.aws/v8n3t7y5/llm-operator-charts