Skip to content

Workflow file for this run

name: Module 6
on:
push:
branches:
- main
pull_request:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build app fastapi
uses: docker/build-push-action@v2
with:
context: week-6/
file: week-6/Dockerfile
push: true
target: app-fastapi
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/app-fastapi-week-6:latest
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/app-fastapi-week-6:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/app-fastapi-week-6:buildcache,mode=max
# - name: Build app seldon
# uses: docker/build-push-action@v2
# with:
# context: week-5/
# file: week-5/Dockerfile
# push: true
# target: app-seldon
# tags: ${{ secrets.DOCKER_HUB_USERNAME }}/app-seldon:latest
# cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/app-seldon:buildcache
# cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/app-seldon:buildcache,mode=max