Skip to content

Commit

Permalink
docker push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekkrthakur committed Dec 7, 2023
1 parent 1721f6d commit d52f950
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Push Docker Image to Docker Hub

on:
push:
branches:
- main

jobs:
build_and_push:
name: Build and Push Docker image using Makefile
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker Image
run: make docker
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ test:
docker:
docker build -t autotrain-advanced:latest .
docker tag autotrain-advanced:latest huggingface/autotrain-advanced:latest
docker tag autotrain-advanced:latest huggingface/autotrain-advanced-api:latest
docker push huggingface/autotrain-advanced:latest
docker push huggingface/autotrain-advanced-api:latest

ngc:
docker build -t autotrain-advanced:latest .
Expand Down

0 comments on commit d52f950

Please sign in to comment.