CPU Docker Image Build #302
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: CPU Docker Image Build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: '0 1 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build the CPU Docker image | |
| run: | | |
| TAG=$(date -u +%Y%m%d%H%M%S) | |
| docker build --no-cache --build-arg VHLS_PATH=/mnt/applications/Xilinx/23.1 \ | |
| --build-arg VHLS_VERSION=2023.1 \ | |
| -f Dockerfile-cpu \ | |
| --tag docker.io/deepwok/mase-docker-cpu:$TAG . || exit 1 | |
| # Push to dockerhub | |
| if [ "${{ secrets.DOCKER_HUB_PASSWORD }}" != "" ]; then | |
| echo ${{secrets.DOCKER_HUB_PASSWORD}} | docker login docker.io -u deepwok --password-stdin | |
| docker push docker.io/deepwok/mase-docker-cpu:$TAG | |
| docker tag docker.io/deepwok/mase-docker-cpu:$TAG docker.io/deepwok/mase-docker-cpu:latest | |
| docker push docker.io/deepwok/mase-docker-cpu:latest | |
| echo "MASE Docker image for CPU pushed." | |
| else | |
| echo "Skipped pushing docker image for CPU." | |
| fi | |