Skip to content

Release

Release #95

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build-docker:
name: Build llm-foundry Release Docker Image
runs-on: mosaic-8wide
if: github.repository_owner == 'mosaicml'
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Define Docker tags
id: define-tags
run: |
BRANCH_NAME="${{ github.ref_name }}"
TAG_NAME=$(echo "${BRANCH_NAME}" | sed 's/\//_/g')
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
echo "DOCKER_TAG=mosaicml/llm-foundry:release_${TAG_NAME}" >> $GITHUB_ENV
echo "AWS_DOCKER_TAG=mosaicml/llm-foundry:release_${TAG_NAME}_aws" >> $GITHUB_ENV
echo "LATEST_TAG=mosaicml/llm-foundry:release-latest" >> $GITHUB_ENV
echo "AWS_LATEST_TAG=mosaicml/llm-foundry:release_aws-latest" >> $GITHUB_ENV
- name: Build and push AWS Docker image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: |
${{ env.AWS_DOCKER_TAG }}
${{ env.AWS_LATEST_TAG }}
build-args: |
BASE_IMAGE=mosaicml/llm-foundry:2.4.0_cu124-latest
BRANCH_NAME=${{ env.BRANCH_NAME }}
DEP_GROUPS=[all]
KEEP_FOUNDRY=true
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: true
tags: |
${{ env.DOCKER_TAG }}
${{ env.LATEST_TAG }}
build-args: |
BASE_IMAGE=mosaicml/llm-foundry:2.4.0_cu124-latest
BRANCH_NAME=${{ env.BRANCH_NAME }}
DEP_GROUPS=[all]
KEEP_FOUNDRY=true