Auto-sync Fri Feb 13 08:51:24 UTC 2026
This commit is contained in:
23
u/antigravity/git_sync.flow/a.inline_script.sh
Normal file
23
u/antigravity/git_sync.flow/a.inline_script.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
export WM_BASE_URL="http://windmill_server:8000"
|
||||
export WM_WORKSPACE="admins"
|
||||
export PATH=$HOME/.npm-global/bin:$PATH
|
||||
|
||||
echo "=== START SYNC ==="
|
||||
|
||||
if ! command -v wmill &> /dev/null; then
|
||||
npm install -g windmill-cli
|
||||
fi
|
||||
|
||||
cd /workspace
|
||||
wmill sync pull --token "$WM_TOKEN" --base-url "$WM_BASE_URL" --workspace "$WM_WORKSPACE" --skip-variables --skip-secrets --skip-resources --yes --verbose || exit 1
|
||||
|
||||
git config --global --add safe.directory /workspace
|
||||
git config --global user.email "bot@example.com"
|
||||
git config --global user.name "Bot"
|
||||
|
||||
git add .
|
||||
git commit -m "Auto-sync $(date)" || echo "No changes"
|
||||
|
||||
echo "=== END SYNC ==="
|
||||
17
u/antigravity/git_sync.flow/flow.yaml
Normal file
17
u/antigravity/git_sync.flow/flow.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
summary: Git Sync Workflow
|
||||
description: Automatically sync Windmill workflows to Git repository
|
||||
value:
|
||||
modules:
|
||||
- id: a
|
||||
value:
|
||||
type: rawscript
|
||||
content: '!inline a.inline_script.sh'
|
||||
input_transforms: {}
|
||||
lock: ''
|
||||
language: bash
|
||||
schema:
|
||||
$schema: 'https://json-schema.org/draft/2020-12/schema'
|
||||
type: object
|
||||
order: []
|
||||
properties: {}
|
||||
required: []
|
||||
5
u/antigravity/hello_world_demo.flow/a.inline_script.lock
Normal file
5
u/antigravity/hello_world_demo.flow/a.inline_script.lock
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {}
|
||||
}
|
||||
//bun.lock
|
||||
<empty>
|
||||
3
u/antigravity/hello_world_demo.flow/a.inline_script.ts
Normal file
3
u/antigravity/hello_world_demo.flow/a.inline_script.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export async function main() {
|
||||
return "Hello, World!"
|
||||
}
|
||||
17
u/antigravity/hello_world_demo.flow/flow.yaml
Normal file
17
u/antigravity/hello_world_demo.flow/flow.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
summary: hello_world_demo
|
||||
description: ''
|
||||
value:
|
||||
modules:
|
||||
- id: a
|
||||
value:
|
||||
type: rawscript
|
||||
content: '!inline a.inline_script.ts'
|
||||
input_transforms: {}
|
||||
lock: '!inline a.inline_script.lock'
|
||||
language: bun
|
||||
schema:
|
||||
$schema: 'https://json-schema.org/draft/2020-12/schema'
|
||||
type: object
|
||||
order: []
|
||||
properties: {}
|
||||
required: []
|
||||
4
u/antigravity/test_git_sync.py
Normal file
4
u/antigravity/test_git_sync.py
Normal file
@@ -0,0 +1,4 @@
|
||||
def main():
|
||||
print("Hello from Git Sync Test")
|
||||
return {"status": "success"}
|
||||
|
||||
1
u/antigravity/test_git_sync.script.lock
Normal file
1
u/antigravity/test_git_sync.script.lock
Normal file
@@ -0,0 +1 @@
|
||||
# py: 3.12
|
||||
9
u/antigravity/test_git_sync.script.yaml
Normal file
9
u/antigravity/test_git_sync.script.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
summary: Test script for Git auto-sync
|
||||
description: Test workflow for Git auto-sync
|
||||
lock: '!inline u/antigravity/test_git_sync.script.lock'
|
||||
kind: script
|
||||
schema:
|
||||
$schema: 'https://json-schema.org/draft/2020-12/schema'
|
||||
type: object
|
||||
properties: {}
|
||||
required: []
|
||||
Reference in New Issue
Block a user