version = "1.12.0" (#850) #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push to AWS - Release | |
on: | |
push: | |
tags: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.LLM_STUDIO_AWS_ROLE }} | |
role-session-name: ${{ secrets.LLM_STUDIO_AWS_ROLE_SESSION_NAME }} | |
aws-region: ${{ secrets.LLM_STUDIO_AWS_REGION }} | |
- name: Login to ECR | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Clean Docker images | |
run: |- | |
echo "Available storage before cleaning:" | |
df -h | |
docker system prune --all --force | |
echo "Available storage:" | |
df -h | |
echo "Removing dotnet" | |
sudo rm -rf /usr/share/dotnet | |
echo "Available storage:" | |
df -h | |
- name: Docker Build Image | |
run: |- | |
docker build -t ${{ secrets.LLM_STUDIO_AWS_ECR }}:${{ github.ref_name }} . | |
- name: Push to AWS | |
run: |- | |
docker push ${{ secrets.LLM_STUDIO_AWS_ECR }}:${{ github.ref_name }} |