-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
64 lines (59 loc) · 2.21 KB
/
Copy pathaction.yaml
File metadata and controls
64 lines (59 loc) · 2.21 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
57
58
59
60
61
62
63
64
name: Deploy to Tailor Platform
description: >-
Deploy application to Tailor Platform.
Requires Node.js and dependencies to be installed by the caller.
inputs:
workspace-id:
description: >-
Tailor Platform workspace ID to deploy to.
Set this from a GitHub Environment variable (e.g. vars.TAILOR_PLATFORM_WORKSPACE_ID).
required: true
working-directory:
description: Working directory for the project (for monorepo setups)
required: false
default: "."
package-manager:
description: >-
Package manager used to run tailor-sdk (pnpm, npm, yarn, or bun).
Defaults to npx when empty, so Bun uses its own runtime instead of
relying on an ambient Node, and the locally-installed version is used.
required: false
default: ""
platform-client-id:
description: OAuth2 client ID for Tailor Platform machine user
required: true
platform-client-secret:
description: OAuth2 client secret for Tailor Platform machine user
required: true
outputs:
workspace-id:
description: Tailor Platform workspace ID
value: ${{ inputs.workspace-id }}
app-url:
description: Application URL (GraphQL endpoint) of the deployed workspace
value: ${{ steps.deploy.outputs.app-url }}
runs:
using: composite
steps:
- name: Set up Tailor SDK
uses: tailor-platform/actions/_internal/sdk-setup@d203a37c87b7a69c6040611c33e9e50c1d564ed1
with:
platform-client-id: ${{ inputs.platform-client-id }}
platform-client-secret: ${{ inputs.platform-client-secret }}
package-manager: ${{ inputs.package-manager }}
working-directory: ${{ inputs.working-directory }}
- name: Validate workspace-id
shell: bash
env:
WORKSPACE_ID: ${{ inputs.workspace-id }}
run: |
if [ -z "$WORKSPACE_ID" ]; then
echo "::error::Workspace is not provisioned: TAILOR_PLATFORM_WORKSPACE_ID is empty. Provision the workspace and set the variable."
exit 1
fi
- name: Deploy
id: deploy
uses: tailor-platform/actions/_internal/deploy@d203a37c87b7a69c6040611c33e9e50c1d564ed1
with:
workspace-id: ${{ inputs.workspace-id }}
working-directory: ${{ inputs.working-directory }}