CS553_CaseStudy1 / .github /workflows /docker_build_and_push.yaml
smdbs
fix: remove pytorch dependency and make docker_build_and_push run after testspass
510d44e
Raw History Blame Contribute Delete
901 Bytes
name: docker_build_and_push
on:
workflow_run:
workflows:
- Python tests
types:
- completed
# to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/cs553:cs4