Skip to content

Commit

Permalink
ci: add ml image in release (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Aug 4, 2024
1 parent 8f563c7 commit 88b55b0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-ml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and push ml image

on:
release:
types: [published]

jobs:
build-push:
runs-on: ubuntu-latest
steps:
- name: Check out the private ml repo
uses: actions/checkout@v4
with:
repository: lunary/ml

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "lunary/lunary"

- name: Remove 'v' prefix from release tag
id: release_tag
run: echo "tag=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')" >> $GITHUB_OUTPUT

- name: Build and push ml
uses: docker/build-push-action@v5
with:
push: true
tags: |
lunary/ml:latest
lunary/ml:${{ steps.release_tag.outputs.tag }}
platforms: linux/arm64,linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 88b55b0

Please sign in to comment.