diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 2bdfac0..5009640 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -40,7 +40,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set branch name as RELEASE_VERSION + - name: Set branch name as release version id: get_tag run: echo "RELEASE_VERSION=${GITHUB_REF##refs/heads/}" | sed 's/\//-/g' >> $GITHUB_ENV @@ -49,7 +49,8 @@ jobs: with: push: true targets: sd3 - env: - HUGGINGFACE_ACCESS_TOKEN: ${{ secrets.HUGGINGFACE_ACCESS_TOKEN }} - DOCKERHUB_REPO: ${{ secrets.DOCKERHUB_REPO }} - DOCKERHUB_IMG: ${{ secrets.DOCKERHUB_IMG }} + set: | + DOCKERHUB_REPO=${{ secrets.DOCKERHUB_REPO }} + DOCKERHUB_IMG=${{ secrets.DOCKERHUB_IMG }} + RELEASE_VERSION=${{ env.RELEASE_VERSION }} + HUGGINGFACE_ACCESS_TOKEN=${{ secrets.HUGGINGFACE_ACCESS_TOKEN }} diff --git a/docker-bake.hcl b/docker-bake.hcl index fad4b7c..99d06fd 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,3 +1,19 @@ +variable "DOCKERHUB_REPO" { + default = "" +} + +variable "DOCKERHUB_IMG" { + default = "" +} + +variable "RELEASE_VERSION" { + default = "" +} + +variable "HUGGINGFACE_ACCESS_TOKEN" { + default = "" +} + group "default" { targets = ["base", "sdxl", "sd3"] } @@ -26,6 +42,7 @@ target "sd3" { target = "final" args = { MODEL_TYPE = "sd3" + HUGGINGFACE_ACCESS_TOKEN = "${HUGGINGFACE_ACCESS_TOKEN}" } tags = ["${DOCKERHUB_REPO}/${DOCKERHUB_IMG}:${RELEASE_VERSION}-sd3"] inherits = ["base"]