-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathaction.yml
More file actions
39 lines (35 loc) · 1.1 KB
/
Copy pathaction.yml
File metadata and controls
39 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Setup Replicate
description: Install the Replicate CLI so you can interact with Replicate from GitHub Actions
author: replicate
branding:
icon: terminal
color: gray-dark
inputs:
token:
required: true
description: "The token used to authenticate with Replicate. Get yours from https://replicate.com/account."
replicate-version:
description: "The version of the Replicate CLI to install"
required: false
default: latest
runs:
using: "composite"
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@241d02265a546187fb2481c01689a6d5ac6d1549 # master
- name: Set up Replicate
shell: bash
run: |
brew tap replicate/tap
if [[ "${{ inputs.replicate-version }}" != "latest" ]]; then
brew install replicate@${{ inputs.replicate-version }}
else
brew install replicate
fi
- name: Log in to Replicate
shell: bash
if: ${{ inputs.token != '' }}
env:
REPLICATE_API_TOKEN: ${{ inputs.token }}
run: |
echo $REPLICATE_API_TOKEN | replicate auth login --token-stdin