Skip to content

Commit 7028327

Browse files
Update docker-build.yml
Automate build
1 parent 73b93a7 commit 7028327

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/docker-build.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Docker Build
55

66
on:
77
push:
8-
branches: [ "main", "311-from-310-add-mlflow-autolog-to-stage-1-b" ]
8+
branches: [ "main", "312-from-311-add-automated-dockerhub-push-of-container" ]
99

1010
permissions:
1111
contents: read
@@ -35,3 +35,17 @@ jobs:
3535
-e PHASE_I_B_VAL_SPLIT=0.15 \
3636
-e MAX_SEQ_LENGTH=96 \
3737
davidt101/cerebros-llm:${{ github.run_number }}
38+
39+
- name: Login to Docker Hub
40+
uses: docker/login-action@v4
41+
if: ${{ github.ref_name == '312-from-311-add-automated-dockerhub-push-of-container' }}
42+
with:
43+
username: ${{ secrets.DOCKER_USERNAME }}
44+
password: ${{ secrets.DOCKER_PASSWORD }}
45+
46+
- name: Push Docker Image
47+
if: ${{ github.ref_name == '312-from-311-add-automated-dockerhub-push-of-container' }}
48+
run: |
49+
docker tag davidt101/cerebros-llm:${{ github.run_number }} davidt101/cerebros-llm:latest
50+
docker push davidt101/cerebros-llm:${{ github.run_number }}
51+
docker push davidt101/cerebros-llm:latest

0 commit comments

Comments
 (0)