-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
137 lines (115 loc) · 3.81 KB
/
action.yaml
File metadata and controls
137 lines (115 loc) · 3.81 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: 'Flow Execute'
description: 'Execute flow workflows in GitHub Actions'
author: 'jahvon'
inputs:
executable:
description: 'Flow executable to run (e.g., "VERB NAME", "build app", "test unit", "deploy staging")'
required: true
workspace:
description: 'Flow workspace to use (path or name)'
required: false
default: '.'
workspace-name:
description: 'Name for the workspace (auto-generated if not provided)'
required: false
default: ''
workspaces:
description: 'YAML/JSON map of workspaces (supports local paths and git repositories)'
required: false
default: ''
clone-token:
description: 'GitHub token for cloning private repositories'
required: false
default: ''
clone-depth:
description: 'Git clone depth for repository cloning'
required: false
default: '1'
checkout-path:
description: 'Base directory for cloning repositories'
required: false
default: '.flow-workspaces'
flow-version:
description: 'Version of flow CLI to install'
required: false
default: 'latest'
secrets:
description: 'JSON object of secrets to set in flow vault (key-value pairs)'
required: false
default: '{}'
vault-key:
description: 'Vault encryption key (for existing vaults)'
required: false
working-directory:
description: 'Directory to run flow from'
required: false
default: '.'
timeout:
description: 'Timeout for executable execution'
required: false
default: '30m'
upload:
description: 'Upload flow logs as an artifact'
required: false
default: 'false'
continue-on-error:
description: 'Continue workflow if flow executable fails'
required: false
default: 'false'
outputs:
exit-code:
description: 'Exit code of the flow executable'
value: ${{ steps.flow-exec.outputs.exit-code }}
output:
description: 'Output from the flow executable'
value: ${{ steps.flow-exec.outputs.output }}
runs:
using: 'composite'
steps:
- name: Install flow CLI
shell: bash
run: ${{ github.action_path }}/scripts/install-flow.sh
env:
FLOW_VERSION: ${{ inputs.flow-version }}
TIMEOUT: ${{ inputs.timeout }}
- name: Setup flow workspaces
shell: bash
run: ${{ github.action_path }}/scripts/setup-workspaces.sh
working-directory: ${{ inputs.working-directory }}
env:
WORKSPACES_INPUT: ${{ inputs.workspaces }}
WORKSPACE_PATH: ${{ inputs.workspace }}
WORKSPACE_NAME: ${{ inputs.workspace-name }}
CLONE_TOKEN: ${{ inputs.clone-token }}
CLONE_DEPTH: ${{ inputs.clone-depth }}
CHECKOUT_PATH: ${{ inputs.checkout-path }}
EXECUTABLE_INPUT: ${{ inputs.executable }}
- name: Setup vault and secrets
shell: bash
run: ${{ github.action_path }}/scripts/setup-vault.sh
working-directory: ${{ inputs.working-directory }}
if: inputs.secrets != '{}' || inputs.vault-key != ''
env:
SECRETS_INPUT: ${{ inputs.secrets }}
VAULT_KEY: ${{ inputs.vault-key }}
- name: Execute flow executable
shell: bash
run: ${{ github.action_path }}/scripts/execute.sh
working-directory: ${{ inputs.working-directory }}
id: flow-exec
env:
EXECUTABLE_INPUT: ${{ inputs.executable }}
VAULT_KEY: ${{ inputs.vault-key }}
CONTINUE_ON_ERROR: ${{ inputs.continue-on-error }}
GITHUB_OUTPUT: ${{ github.outputs }}
CAPTURE: ${{ inputs.upload == 'true' }}
- name: Upload flow logs
uses: actions/upload-artifact@v4
if: ${{ inputs.upload == 'true' && steps.flow-exec.outputs.exit-code != '0' }}
with:
name: flow-executable-logs-${{ github.job }}
path: ${{ inputs.working-directory }}/executable_output.txt
retention-days: 1
branding:
icon: 'play'
color: 'white'