Skip to content

Commit

Permalink
ci: back to basics
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Jul 25, 2024
1 parent 4dea01d commit 31aeade
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,25 @@ jobs:

- name: Set environment variables
run: |
echo "DOCKERHUB_REPO=${{ secrets.DOCKERHUB_REPO }}" >> $GITHUB_ENV
echo "DOCKERHUB_IMG=${{ secrets.DOCKERHUB_IMG }}" >> $GITHUB_ENV
echo "HUGGINGFACE_ACCESS_TOKEN=${{ secrets.HUGGINGFACE_ACCESS_TOKEN }}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF##refs/heads/}" | sed 's/\//-/g' >> $GITHUB_ENV
- name: Print env
run: env

- name: Build and push the images
uses: docker/bake-action@v2
with:
push: true
targets: sd3
set: |
base.args.DOCKERHUB_REPO=${{ env.DOCKERHUB_REPO }}
base.args.DOCKERHUB_IMG=${{ env.DOCKERHUB_IMG }}
base.args.DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO }}
base.args.DOCKERHUB_IMG=${{ vars.DOCKERHUB_IMG }}
base.args.RELEASE_VERSION=${{ env.RELEASE_VERSION }}
sdxl.args.DOCKERHUB_REPO=${{ env.DOCKERHUB_REPO }}
sdxl.args.DOCKERHUB_IMG=${{ env.DOCKERHUB_IMG }}
sdxl.args.DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO }}
sdxl.args.DOCKERHUB_IMG=${{ vars.DOCKERHUB_IMG }}
sdxl.args.RELEASE_VERSION=${{ env.RELEASE_VERSION }}
sd3.args.HUGGINGFACE_ACCESS_TOKEN=${{ env.HUGGINGFACE_ACCESS_TOKEN }}
sd3.args.DOCKERHUB_REPO=${{ env.DOCKERHUB_REPO }}
sd3.args.DOCKERHUB_IMG=${{ env.DOCKERHUB_IMG }}
sd3.args.DOCKERHUB_REPO=${{ vars.DOCKERHUB_REPO }}
sd3.args.DOCKERHUB_IMG=${{ vars.DOCKERHUB_IMG }}
sd3.args.RELEASE_VERSION=${{ env.RELEASE_VERSION }}
9 changes: 1 addition & 8 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "DOCKERHUB_REPO" {
default = "timpietruskyblibla"
default = ""
}

variable "DOCKERHUB_IMG" {
Expand All @@ -22,11 +22,6 @@ target "base" {
context = "."
dockerfile = "Dockerfile"
target = "base"
args = {
DOCKERHUB_REPO = "${DOCKERHUB_REPO}"
DOCKERHUB_IMG = "${DOCKERHUB_IMG}"
RELEASE_VERSION = "${RELEASE_VERSION}"
}
tags = ["${DOCKERHUB_REPO}/${DOCKERHUB_IMG}:${RELEASE_VERSION}-base"]
}

Expand All @@ -46,8 +41,6 @@ target "sd3" {
dockerfile = "Dockerfile"
target = "final"
args = {
DOCKERHUB_REPO = "${DOCKERHUB_REPO}"
DOCKERHUB_IMG = "${DOCKERHUB_IMG}"
MODEL_TYPE = "sd3"
HUGGINGFACE_ACCESS_TOKEN = "${HUGGINGFACE_ACCESS_TOKEN}"
}
Expand Down

0 comments on commit 31aeade

Please sign in to comment.