Files
shockbot/README.md
T
Colin McDonnell 3139f541e4 feat: integrate OIDC token exchange in GitHub Action
- Add setupGitHubInstallationToken utility for OIDC token generation
- Implement automatic token exchange with Pullfrog API endpoint
- Add support for multiple authentication methods (input, env, OIDC)
- Create setup utilities for test repository management
- Update action entry point to handle new token flow
- Add environment variable documentation for API key
- Remove large bundled dependencies and optimize build
- Support both development and production token workflows
2025-09-10 00:30:45 -07:00

2.1 KiB

Pullfrog Action

GitHub Action for running Claude Code and other agents via Pullfrog.

Quick Start

# Install dependencies
pnpm install

# Test with default prompt
npm run play              # Run locally on your machine
npm run play -- --act     # Run in Docker (simulates GitHub Actions)

Testing with play.ts

The play.ts script provides two ways to test the action:

Local Mode (Default)

npm run play                        # Uses fixtures/play.txt
npm run play fixtures/complex.txt   # Custom prompt file
  • Clones the scratch repository to .temp
  • Runs Claude Code directly on your machine
  • Fast iteration for development

Docker Mode (--act flag)

npm run play -- --act                        # Uses fixtures/play.txt
npm run play fixtures/simple.txt -- --act    # Custom prompt file
  • Builds fresh bundles with esbuild
  • Creates minimal distribution without node_modules
  • Runs in Docker container via act
  • Simulates GitHub Actions environment

Prompt Files

Supports .txt, .json, and .ts files:

npm run play prompt.txt           # Plain text prompt
npm run play config.json          # JSON configuration
npm run play dynamic.ts           # TypeScript with default export

Building

pnpm build        # Production build (bundles & removes node_modules)
pnpm build:dev    # Development build (keeps node_modules)
pnpm dev          # Watch mode

The action is bundled into entry.cjs with all dependencies included, eliminating runtime dependency on node_modules.

Environment Variables

Create .env in /action:

ANTHROPIC_API_KEY=sk-ant-api03-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  # Claude API key

Architecture

  • entry.cjs: Bundled action entry point (self-contained)
  • agents/: Agent implementations (Claude, etc.)
  • utils/: Utilities for subprocess, act, and formatting
  • fixtures/: Test prompt files

Why No node_modules?

pnpm uses symlinks that cause "invalid symlink" errors when act copies the action to Docker. Our solution:

  1. Bundle everything into entry.cjs
  2. Remove node_modules after building
  3. Create minimal .act-dist for Docker testing