Skip to content

Commit 5484489

Browse files
committed
chore(ci): update model catalog fetch method in workflows
1 parent 0ac52da commit 5484489

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/docker-image.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v4
1818
- name: Refresh models catalog
19-
run: curl -fsSL https://raw.githubusercontent.com/router-for-me/models/refs/heads/main/models.json -o internal/registry/models/models.json
19+
run: |
20+
git fetch --depth 1 https://github.com/router-for-me/models.git main
21+
git show FETCH_HEAD:models.json > internal/registry/models/models.json
2022
- name: Set up Docker Buildx
2123
uses: docker/setup-buildx-action@v3
2224
- name: Login to DockerHub
@@ -49,7 +51,9 @@ jobs:
4951
- name: Checkout
5052
uses: actions/checkout@v4
5153
- name: Refresh models catalog
52-
run: curl -fsSL https://raw.githubusercontent.com/router-for-me/models/refs/heads/main/models.json -o internal/registry/models/models.json
54+
run: |
55+
git fetch --depth 1 https://github.com/router-for-me/models.git main
56+
git show FETCH_HEAD:models.json > internal/registry/models/models.json
5357
- name: Set up Docker Buildx
5458
uses: docker/setup-buildx-action@v3
5559
- name: Login to DockerHub

.github/workflows/pr-test-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
- name: Refresh models catalog
16-
run: curl -fsSL https://raw.githubusercontent.com/router-for-me/models/refs/heads/main/models.json -o internal/registry/models/models.json
16+
run: |
17+
git fetch --depth 1 https://github.com/router-for-me/models.git main
18+
git show FETCH_HEAD:models.json > internal/registry/models/models.json
1719
- name: Set up Go
1820
uses: actions/setup-go@v5
1921
with:

0 commit comments

Comments
 (0)