How prefix-dev/setup-pixi works
Main Components
a) Action Core Components:
• Input Handler (options.ts)
• Main Action Logic (main.ts)
• Post-cleanup Logic (post.ts)
• Cache Management (cache.ts)
• Environment Activation (activate.ts)
• Utility Functions (util.ts)
b) External Systems:
• GitHub Actions Runtime
• GitHub Cache Service
• Pixi Package Manager
• Authentication Services (prefix.dev, artifactory, anaconda.org)
┌─────────────────────────────────────── GitHub Actions Environment ───────────────────────────────────────┐
• ┌─────────────────── setup-pixi Action ───────────────────────┐ │
• ┌─────────────────────────┐ │
• ┌─────────────┐ ┌──────────────┐ │ │ GitHub Cache Service │ │
• Inputs │ │ Main Logic │ │ └─────────────────────────┘ │
• Handler ├────────►│ Controller │◄──────Cache─────────────────────────┘ │
• ┘ └──────┬───────┘ │ │
• ┌─────────────────────────┐ │
• ┌─────────────┐ │ │ │ Authentication Services│ │
• Environment │ ▼ │ │ - prefix.dev │ │
• Activation │◄────────┌──────────────┐ │ │ - artifactory │ │
• ┘ │ Pixi Manager │◄────Auth────────────────│ - anaconda.org │ │
• ┘ │ └─────────────────────────┘ │
• ┌─────────────┐ │ │ │
• Post-cleanup │◄──────────────┘ │ │
• ┘ │ │
• ┘ │
• ┘
Key Interactions to Highlight
a) Input Flow:
• Action inputs → Input Handler → Main Logic Controller
• Support for various configuration options (cache, auth, environments)
b) Cache Flow:
• Main Logic ↔ GitHub Cache Service
• Cache key generation and validation
• Environment storage and retrieval
c) Authentication Flow:
• Main Logic → Authentication Services
• Support for multiple auth methods (token, username/password, conda-token)
d) Environment Management:
• Pixi Manager → Environment Activation
• Environment variable and path modifications
• Multiple environment support
Important Notes
• Version information for compatibility
• Cleanup process for self-hosted runners
• Cache optimization paths
• Relationship with GitHub Actions environment variables