diff --git a/.github/workflows/manual-freeze-tag.yml b/.github/workflows/manual-freeze-tag.yml index 4abdcbbda..71e427482 100644 --- a/.github/workflows/manual-freeze-tag.yml +++ b/.github/workflows/manual-freeze-tag.yml @@ -11,11 +11,6 @@ on: description: "Tag to apply to images" required: true type: string - text-generation-inference-tag: - default: "latest" - description: "Tag of ghcr.io/huggingface/text-generation-inference" - required: true - type: string jobs: freeze-tag: @@ -41,7 +36,6 @@ jobs: - name: Run script run: | find . -name "*.md" | xargs sed -i "s|^docker\ compose|TAG=${{ github.event.inputs.tag }}\ docker\ compose|g" - find . -name "*.md" | xargs sed -i "s|ghcr.io/huggingface/text-generation-inference:latest[A-Za-z0-9\-]*|ghcr.io/huggingface/text-generation-inference:${{ github.event.inputs.text-generation-inference-tag }}|g" - name: Commit changes run: | diff --git a/.github/workflows/scripts/freeze_images.sh b/.github/workflows/scripts/freeze_images.sh index 1bf8d194b..a6beff89f 100644 --- a/.github/workflows/scripts/freeze_images.sh +++ b/.github/workflows/scripts/freeze_images.sh @@ -11,7 +11,7 @@ function get_latest_version() { repo_image=$1 versions=$(skopeo list-tags ${dict[$repo_image]} | jq -r '.Tags[]') printf "version list:\n$versions\n" - latest_version=$(printf "%s\n" "${versions[@]}" | grep -E '^[\.0-9]+$' | sort -V | tail -n 1) + latest_version=$(printf "%s\n" "${versions[@]}" | grep -E '^[\.0-9\-]+$' | sort -V | tail -n 1) echo "latest version: $latest_version" replace_image_version $repo_image $latest_version } @@ -25,6 +25,7 @@ function replace_image_version() { echo "replace $repo_image:latest with $repo_image:$version" find . -name "Dockerfile" | xargs sed -i "s|$repo_image:latest.*|$repo_image:$version|g" find . -name "*.yaml" | xargs sed -i "s|$repo_image:latest[A-Za-z0-9\-]*|$repo_image:$version|g" + find . -name "*.md" | xargs sed -i "s|$repo_image:latest[A-Za-z0-9\-]*|$repo_image:$version|g" fi }