Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
runner:
known_runners:
- eli
24 changes: 24 additions & 0 deletions .github/actions/dynamic-scheduler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Dependencies
node_modules/

# Build output
dist/
!dist/index.js
!dist/index.js.map
!dist/licenses.txt
!dist/sourcemap-register.js

# IDE
.vscode/
.idea/

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment
.env
.env.local
.env.*.local
25 changes: 25 additions & 0 deletions .github/actions/dynamic-scheduler/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Dynamic Scheduler
description: Dynamically schedules jobs based on API response
inputs:
workflow_file:
description: Path to the workflow file
required: false
debug:
description: Enable debug logging
required: false
default: 'false'
github_token:
description: GitHub token for posting PR comments (optional)
required: false
outputs:
jobNames:
description: List of job names from the API response
workflowPath:
description: Path to the workflow file
content:
description: Workflow content (only when debug is true)
skip:
description: JSON object containing skip flags for each step
runs:
using: node20
main: dist/index.js
50 changes: 50 additions & 0 deletions .github/actions/dynamic-scheduler/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
set -e

# Get the directory where the script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Change to the script directory
cd "$SCRIPT_DIR"

echo "🚀 Building dynamic-scheduler action from $(pwd)..."

# Clean previous build
echo "🧹 Cleaning previous build..."
rm -rf dist/
rm -rf node_modules/

# Install dependencies
echo "📦 Installing dependencies..."
if [ -f "package-lock.json" ]; then
npm ci
else
echo "⚠️ No package-lock.json found, using npm install..."
npm install
fi

# Build TypeScript
echo "🔨 Building TypeScript..."
npm run build

# Package the action
echo "📦 Packaging action..."
npm run package

# Verify the build
echo "🔍 Verifying build files..."
required_files=(
"dist/index.js"
"dist/index.js.map"
"dist/licenses.txt"
"dist/sourcemap-register.js"
)

for file in "${required_files[@]}"; do
if [ ! -f "$file" ]; then
echo "❌ Build failed: $file not found"
exit 1
fi
done

echo "✅ Build completed successfully!"
Loading
Loading