chore: include the nightly tools and nightly format #76
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 Publish Node Images (CUDA & Standard) | |
on: | |
push: | |
branches: | |
- main | |
- helm | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
flavor: [standard, cuda] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: true | |
docker-images: false | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract Version from Cargo.toml | |
run: echo "VERSION=${{ github.head_ref || github.ref_name }}-$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "bonsol-node") | .version')" >> $GITHUB_ENV | |
working-directory: ./node | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
file: Dockerfile.${{ matrix.flavor }} | |
tags: | | |
ghcr.io/${{ github.repository_owner }}/bonsol-node:${{ matrix.flavor }}-${{ env.VERSION }} | |
ghcr.io/${{ github.repository_owner }}/bonsol-node:${{ matrix.flavor }}-${{ github.sha }} | |
platforms: linux/amd64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |