forked from susheelsk/image-background-removal
-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addded new workflow for build and push docker images
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "Docker images" | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up Docker BuildX | ||
uses: docker/setup-buildx-action@v2 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
file: {context}/Dockerfile.cpu | ||
tags: | | ||
anodev/carvekit:latest-cpu | ||
anodev/carvekit:${{ env-release_version }}-cpu | ||
- | ||
name: Build and push cuda | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: true | ||
file: {context}/Dockerfile.cuda | ||
tags: | | ||
anodev/carvekit:latest-cuda | ||
anodev/carvekit:${{ env-release_version }}-cuda |