This GitHub Action allows you to trigger a pipeline on Cycle.io, pass variables, and track the execution step-by-step with detailed logging.
✅ Triggers a Cycle pipeline using the provided Pipeline ID
✅ Passes optional variables and advanced settings
✅ Tracks each step as it progresses
✅ Logs when each step starts and completes
✅ Fails fast if a step fails
Create (or update) your GitHub Actions workflow file (e.g., .github/workflows/cycle-pipeline.yml
):
name: Run Cycle Pipeline
on:
workflow_dispatch: # Allows manual triggering from the GitHub UI
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Track Cycle Pipeline
uses: cycleplatform/[email protected]
with:
api_key: ${{ secrets.CYCLE_API_KEY }}
hub_id: ${{ secrets.CYCLE_HUB_ID }}
pipeline_id: "your-pipeline-id"
variables: |
{
"version": "1.2.3",
"feature_flag": "true"
}
advanced: |
{
"sub_queue": "custom-queue",
"skip_locks": 1
}
Name | Required | Description |
---|---|---|
api_key |
✅ Yes | Your Cycle API Key |
hub_id |
✅ Yes | Your Cycle Hub ID |
pipeline_id |
✅ Yes | The Cycle Pipeline ID to trigger |
variables |
❌ No | JSON string of key-value pairs for pipeline variables (optional) |
advanced |
❌ No | JSON string for advanced pipeline settings (optional) |
When the action runs, you’ll see detailed logs:
🚀 Triggering pipeline: 'Deploy to Staging'
✅ Pipeline triggered successfully! Run ID: 67927ee3fb6a5cc6e0a5a177
⏳ Step started [Stage 1, Step 1]: stack.build.create
✅ Step completed [Stage 1, Step 1]: stack.build.create
⏳ Step started [Stage 1, Step 2]: image.create-import
✅ Step completed [Stage 1, Step 2]: image.create-import
🎉 Pipeline run completed successfully!
✅ Logs each step's start and completion
✅ Identifies the stage and step index
✅ Fails early if a step fails
- Ensure
pipeline_id
is correct. - Verify API key is valid.
This GitHub Action is open-source under the Apache 2.0 License