Repository navigation
model-monitor: v1.2.2 #20
Workflow file for this run
This file contains hidden or 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: Release Helm Chart, Publish Crate, and Docker Image | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| publish-crate: | |
| if: startsWith(github.event.release.tag_name, 'ai-vitals-') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Publish to crates.io | |
| working-directory: ai-vitals | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
| run: cargo publish --no-verify | |
| docker: | |
| if: startsWith(github.event.release.tag_name, 'ai-vitals-') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version from release tag | |
| id: version | |
| run: | | |
| # Remove refs/tags/ai-vitals- prefix and v prefix if present | |
| VERSION=${GITHUB_REF#refs/tags/ai-vitals-} | |
| VERSION=${VERSION#v} | |
| echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository }}/ai-vitals:latest | |
| ghcr.io/${{ github.repository }}/ai-vitals:${{ steps.version.outputs.VERSION }} | |
| release-helm: | |
| if: startsWith(github.event.release.tag_name, 'model-monitor-') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Package and push Helm chart | |
| run: | | |
| helm package helm/ | |
| helm push *.tgz oci://ghcr.io/doublewordai |