diff --git a/.github/workflows/update-models-self.yaml b/.github/workflows/update-models-self.yaml index ed546497..d6511996 100644 --- a/.github/workflows/update-models-self.yaml +++ b/.github/workflows/update-models-self.yaml @@ -48,9 +48,9 @@ jobs: - name: parse matrix run: | - echo "MODEL_NAME=$(echo ${{ matrix.model }} | sed -E 's/([a-z]+)-([0-9]+x[0-9]+b)-.*/\1/' | sed -E 's/([a-z]+)-([0-9]+)-.*/\1\2/')" >> $GITHUB_ENV - echo "MODEL_SIZE=$(echo ${{ matrix.model }} | sed -E 's/[a-z]+-([0-9]+x[0-9]+b|[0-9]+\.?[0-9]*b)-.*/\1/' | sed -E 's/[a-z]+-[0-9]+-([0-9]+\.?[0-9]*b).*/\1/')" >> $GITHUB_ENV - echo "MODEL_TYPE=-$(echo ${{ matrix.model }} | sed -n -e 's/.*\(chat\).*/\1/p' -e 's/.*\(instruct\).*/\1/p')" >> $GITHUB_ENV + echo "MODEL_NAME=$(echo ${{ matrix.model }} | sed -E 's/([a-z]+)-([0-9]+(\.[0-9]+)?)-.*/\1\2/')" >> $GITHUB_ENV + echo "MODEL_SIZE=$(echo ${{ matrix.model }} | sed -E 's/.*-([0-9]+b).*/\1/')" >> $GITHUB_ENV + echo "MODEL_TYPE=-$(echo ${{ matrix.model }} | sed -E 's/.*-[0-9]+(\.[0-9]+)?b(-([^ ]+))?$/\3/')" >> $GITHUB_ENV - name: Build and push run: | diff --git a/.github/workflows/update-models.yaml b/.github/workflows/update-models.yaml index 443d8f65..b73ad1a4 100644 --- a/.github/workflows/update-models.yaml +++ b/.github/workflows/update-models.yaml @@ -79,9 +79,9 @@ jobs: - name: parse matrix run: | - echo "MODEL_NAME=$(echo ${{ matrix.model }} | sed -E 's/([a-z]+)-([0-9]+x[0-9]+b)-.*/\1/' | sed -E 's/([a-z]+)-([0-9]+)-.*/\1\2/')" >> $GITHUB_ENV - echo "MODEL_SIZE=$(echo ${{ matrix.model }} | sed -E 's/[a-z]+-([0-9]+x[0-9]+b|[0-9]+\.?[0-9]*b)-.*/\1/' | sed -E 's/[a-z]+-[0-9]+-([0-9]+\.?[0-9]*b).*/\1/')" >> $GITHUB_ENV - echo "MODEL_TYPE=-$(echo ${{ matrix.model }} | sed -n -e 's/.*\(chat\).*/\1/p' -e 's/.*\(instruct\).*/\1/p')" >> $GITHUB_ENV + echo "MODEL_NAME=$(echo ${{ matrix.model }} | sed -E 's/([a-z]+)-([0-9]+(\.[0-9]+)?)-.*/\1\2/')" >> $GITHUB_ENV + echo "MODEL_SIZE=$(echo ${{ matrix.model }} | sed -E 's/.*-([0-9]+b).*/\1/')" >> $GITHUB_ENV + echo "MODEL_TYPE=-$(echo ${{ matrix.model }} | sed -E 's/.*-[0-9]+(\.[0-9]+)?b(-([^ ]+))?$/\3/')" >> $GITHUB_ENV - name: Build and push run: |