Skip to content

Commit b41915f

Browse files
committed
Allow setting of cog version on deploy
1 parent ef8690e commit b41915f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Push
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
cog_version:
7+
description: 'Cog version to use (eg latest, v0.14.11)'
8+
type: string
9+
default: 'latest'
510

611
jobs:
712
cog-safe-push:
@@ -19,7 +24,11 @@ jobs:
1924

2025
- name: Install Cog
2126
run: |
22-
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)"
27+
if [ "${{ inputs.cog_version }}" = "latest" ]; then
28+
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)"
29+
else
30+
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/download/${{ inputs.cog_version }}/cog_$(uname -s)_$(uname -m)"
31+
fi
2332
sudo chmod +x /usr/local/bin/cog
2433
2534
- name: cog login

0 commit comments

Comments
 (0)