diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 82c68604ee..ca14f6682d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,6 +28,9 @@ jobs: - name: Checkout source uses: actions/checkout@v3 + - name: Setup QEMU + uses: docker/setup-qemu-action@v2 + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 @@ -37,33 +40,26 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - - name: Define Docker tags + - name: Login to GHCR + uses: docker/login-action@v2 + with: + username: ${{ secrets.GHCR_USERNAME }} + password: ${{ secrets.GHCR_TOKEN }} + registry: ghcr.io + + - name: Define Image 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:test-release_${TAG_NAME}${{matrix.aws_extension}}" >> $GITHUB_ENV - - name: Calculate Docker Image Variables + - name: Define Image Cache run: | set -euxo pipefail - - ################### - # Calculate the image cache - ################### - if [ "${{ github.event_name }}" == "pull_request" ]; then - echo "Triggered by pull_request event." - STAGING_REPO="mosaicml/ci-staging" - IMAGE_CACHE="${STAGING_REPO}:${{matrix.name}}-buildcache" - else - # Triggered by push or workflow_dispatch event - echo "Triggered by ${{ github.event_name }} event, releasing to prod" - PROD_REPO="mosaicml/llm-foundry" - IMAGE_CACHE="${PROD_REPO}:${{matrix.name}}-buildcache" - fi - + PROD_REPO="mosaicml/llm-foundry" + IMAGE_CACHE="${PROD_REPO}:${{matrix.name}}-buildcache" echo "IMAGE_CACHE=${IMAGE_CACHE}" >> ${GITHUB_ENV} - name: Build and push Docker image