Skip to content

Commit

Permalink
ci: use variables instead of args
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Jul 24, 2024
1 parent e9da998 commit 2abfa58
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}
17 changes: 17 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -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"]
}
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit 2abfa58

Please sign in to comment.