Skip to content

Fixed Ascend configuration file being placed outside helm charts temp… #40

Fixed Ascend configuration file being placed outside helm charts temp…

Fixed Ascend configuration file being placed outside helm charts temp… #40

name: Release Image
env:
REGISTRY: docker.io
IMAGE_REPO: ${{ secrets.IMAGE_REPO || 'projecthami/hami' }}
IMAGE_ROOT_PATH: docker
BUILD_PLATFORM: linux/arm64,linux/amd64
REGISTER_USER: ${{ github.actor }}
REGISTER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
on:
workflow_dispatch:
push:
branches: ["master"]
tags:
- v*
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Free disk space
# https://github.com/actions/virtual-environments/issues/709
run: |
echo "=========original CI disk space"
df -h
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "=========after clean up, the left CI disk space"
df -h
- name: Get the version
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
if [[ ${GITHUB_REF} == "refs/heads/master" ]]; then
VERSION=latest
fi
echo ::set-output name=VERSION::${VERSION}
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout submodule
uses: Mushus/[email protected]
with:
basePath: # optional, default is .
submodulePath: libvgpu
- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_TOKEN }}
password: ${{ secrets.DOCKERHUB_PASSWD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_REPO }}
- name: Build & Pushing hami image
uses: docker/[email protected]
with:
context: .
file: ${{ env.IMAGE_ROOT_PATH }}/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.BUILD_PLATFORM }}
build-args: |
VERSION=${{ steps.get_version.outputs.VERSION }}
GOLANG_IMAGE=golang:1.22.5-bullseye
NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
DEST_DIR=/usr/local
tags: ${{ steps.meta.outputs.tags }}
push: true
github-token: ${{ env.REGISTER_PASSWORD }}