Skip to content

feat: add docker CLI for building docker containers #3

feat: add docker CLI for building docker containers

feat: add docker CLI for building docker containers #3

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build prod and push
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
tags: ghcr.io/ucsd-e4e/maestro_trainer:latest
push: true
-
name: Build prod and push
if: github.ref != 'refs/heads/main'
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
tags: ghcr.io/ucsd-e4e/maestro_trainer:${{ github.sha }}
push: true