Update github actions #1
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: build_run_test | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10.14' | |
- name: Print out installed python version | |
run: python --version | |
- name: Upgrade pip, setuptools, wheel | |
run: pip install --upgrade pip setuptools wheel | |
- name: Install required packages | |
run: pip install -r requirements.txt | |
test_notebook: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print out installed python version | |
run: python --version | |
- name: Print out installed pip packages | |
run: pip freeze | |
- run: jupyter nbconvert --execute --to html 01_test_notebook.ipynb | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: knutzk/ml-workshop:latest |