-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
56 lines (53 loc) · 1.73 KB
/
action.yml
File metadata and controls
56 lines (53 loc) · 1.73 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: 'Rivet Preview Namespace'
description: 'Automatically create Rivet namespaces for preview deployments'
author: 'Rivet'
branding:
icon: 'server'
color: 'orange'
inputs:
platform:
description: 'Deployment platform (currently only "vercel" is supported)'
required: true
rivet-token:
description: 'Rivet Cloud API token'
required: true
vercel-token:
description: 'Vercel API token (required when platform is "vercel")'
required: false
rivet-endpoint:
description: 'Rivet Engine API endpoint'
required: false
default: 'https://api.rivet.dev'
github-token:
description: 'GitHub token for PR comments'
required: false
default: ${{ github.token }}
main-branch:
description: 'Main branch name for production deployments'
required: false
default: 'main'
runner-config:
description: 'JSON object to override runner configuration. Passed directly to the Rivet API.'
required: false
default: '{}'
runs:
using: 'composite'
steps:
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup Rivet Preview
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
RIVET_CLOUD_TOKEN: ${{ inputs.rivet-token }}
RIVET_ENGINE_ENDPOINT: ${{ inputs.rivet-endpoint }}
PLATFORM: ${{ inputs.platform }}
VERCEL_TOKEN: ${{ inputs.vercel-token }}
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
REPO_FULL_NAME: ${{ github.repository }}
RUN_ID: ${{ github.run_id }}
MAIN_BRANCH: ${{ inputs.main-branch }}
RUNNER_CONFIG: ${{ inputs.runner-config }}
run: bun run ${{ github.action_path }}/src/index.ts