Skip to content

MNIST Job Demo Image #2

MNIST Job Demo Image

MNIST Job Demo Image #2

# This workflow will build the MNIST job demo image and push it to the project-codeflare image registry
name: MNIST Job Demo Image
on:
workflow_dispatch:
inputs:
version:
description: 'Tag to be used for MNIST job demo image. For example pytorch-mnist-v0.0.0'
required: false
push:
branches:
- main
paths:
- 'pytorch_mnist_image/**'
env:
TAG: quay.io/project-codeflare/demo-images
VERSION: ${{ github.event.inputs.version || 'pytorch-mnist-dev' }}
jobs:
build-mnist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Quay.io
id: podman-login-quay
run: |
podman login --username ${{ secrets.QUAY_ID }} --password ${{ secrets.QUAY_TOKEN }} quay.io
- name: Image Build and Push
run: |
podman build -t ${TAG}:${VERSION} ./pytorch_mnist_image
podman push ${TAG}:${VERSION}
- name: Logout from Quay.io
if: always() && steps.podman-login-quay.outcome == 'success'
run: |
podman logout quay.io