Skip to content

Commit b07ab42

Browse files
committed
feat: add dev and release docker builds
1 parent ad5d54c commit b07ab42

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

Diff for: .github/workflows/CD-docker_build.yml renamed to .github/workflows/CD-docker_dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
uses: docker/build-push-action@v4
2323
with:
2424
push: true
25-
tags: runpod/serverless-hello-world:latest
25+
tags: runpod/serverless-hello-world:dev

Diff for: .github/workflows/CD-docker_release.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Docker Image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
docker:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Set up QEMU
12+
uses: docker/setup-qemu-action@v2
13+
- name: Set up Docker Buildx
14+
uses: docker/setup-buildx-action@v2
15+
- name: Login to Docker Hub
16+
uses: docker/login-action@v2
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_TOKEN }}
20+
- name: Build and push
21+
uses: docker/build-push-action@v4
22+
with:
23+
push: true
24+
tags: runpod/serverless-hello-world:${{ github.event.release.tag_name }}

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
This repository is setup to automatically build and push a docker image to the GitHub Container Registry. You will need to add your DockerHub credentials `DOCKERHUB_USERNAME` & `DOCKERHUB_TOKEN` to the GitHub Secrets for this repository to enable this functionality.
2121

22+
You will need to update the `CD-docker_dev.yml` & `CD-docker_release.yml` files to include your DockerHub username and the name of the image you want to build. The `CD-docker_dev.yml` file will build the image and push it to the `dev` tag, while the `CD-docker_release.yml` file will build the image on releases and tag it with the release version.
23+
2224
## Best Practices
2325

2426
Models should be part of your docker image, this can be accomplished by either copying them into the image or downloading them during the build process.
27+
28+
If using the input validation utility from the runpod python package, create a `schemas` python file where you can define the schemas, then import that file into your `handler.py` file.

0 commit comments

Comments
 (0)