docker-image #54
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: docker-image | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Cleanup steps to free up disk space | |
- name: Cleanup disk space | |
if: runner.os == 'Linux' | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Build the Docker image | |
run: docker build -t hvgazula/nobrainer -f ./nobrainer-docker/cpu.Dockerfile . | |
# Cleanup steps to free up disk space | |
# Push the Docker image to Docker Hub (only if the PR is merged) | |
- name: Push Docker image | |
# if: github.event.pull_request.merged == true | |
run: | | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | |
docker push hvgazula/nobrainer:cpu |