# This workflow will run whenever there is a change to the version of LLVM the project is based on # It will create a new Docker image for the TravisCI build and push it to Docker Hub # This image contains the prereqs for building onnx-mlir including a precompiled copy of the appropriate # LLVM and MLIR code. # # To make this work on your fork you need to enable the github workflow and set a personal access token for your # docker hub account in the github secrets. # When the action succeeds it will put the prereq image in your docker hub repository. name: Build Docker Prereq Image # Run this workflow when there is a change to clone-mlir.sh (that implies a new version of LLVM is being used) on: push: paths: - 'utils/clone-mlir.sh' jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - name: build image on fork if: ! endsWith(github.ref, '/master') env: DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} run: | docker build --tag $GITHUB_ACTOR/onnx-mlir-llvmimage:initial -f $GITHUB_WORKSPACE/.github/workflows/prereq.Dockerfile $GITHUB_WORKSPACE/utils docker login -u $GITHUB_ACTOR -p "$DOCKER_HUB_TOKEN" docker push $GITHUB_ACTOR/onnx-mlir-llvmimage:initial - name: build image on master if: endsWith(github.ref, '/master') run: | docker build --tag onnxmlirczar/onnx-mlir-llvmimage:initial -f $GITHUB_WORKSPACE/.github/workflows/prereq.Dockerfile $GITHUB_WORKSPACE/utils docker login -u onnxmlirczar -p "$DOCKER_HUB_TOKEN" docker push onnxmlirczar/onnx-mlir-llvmimage:initial