Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
57 lines (57 loc) · 1.87 KB
/
Copy pathaction.yml
File metadata and controls
57 lines (57 loc) · 1.87 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
name: 'openfn deploy'
branding:
icon: 'upload'
color: 'purple'
description: 'Deploys an OpenFn project workspace to a Lightning instance'
inputs:
secret_input:
description: "OpenFN API KEY"
required: true
project_id_input:
description: "OpenFN Project ID to deploy to"
required: true
endpoint_input:
description: "Lightning URL, e.g. https://app.openfn.org. Defaults to the endpoint the workspace tracks"
required: false
default: ''
workspace_input:
description: "Folder holding the project's openfn.yaml, relative to the repo root. Defaults to the root"
required: false
default: ''
force_input:
description: "Deploy even if the project has changed in Lightning since the last sync"
required: false
default: 'false'
runs:
using: "composite"
steps:
- name: Checkout Project export
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24.x
- name: Install OpenFn CLI
run: npm install -g @openfn/cli@latest
shell: bash
- name: Deploy project to OpenFn
run: |
args=(--no-confirm --log info)
if [ -n "$OPENFN_DEPLOY_ENDPOINT" ]; then
args+=(--endpoint "$OPENFN_DEPLOY_ENDPOINT")
fi
if [ "$OPENFN_FORCE" = "true" ]; then
args+=(--force)
fi
openfn project deploy "$OPENFN_PROJECT_ID" "${args[@]}"
shell: bash
env:
OPENFN_API_KEY: ${{ inputs.secret_input }}
OPENFN_PROJECT_ID: ${{ inputs.project_id_input }}
OPENFN_DEPLOY_ENDPOINT: ${{ inputs.endpoint_input }}
OPENFN_FORCE: ${{ inputs.force_input }}
OPENFN_WORKSPACE: ${{ inputs.workspace_input }}
- name: Commit updated state file
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Changes accepted by Lightning; updated current project state