Skip to content

cycleplatform/pipeline-trigger-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cycle Pipeline Github Action

cycle

Trigger a pipeline on Cycle using a GitHub Action

This GitHub Action allows you to trigger a pipeline on Cycle.io, pass variables, and track the execution step-by-step with detailed logging.


📖 How It Works

✅ 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


📌 Usage

1️⃣ Add this Action to Your Workflow

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
                      }

⚙️ Inputs

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)

📜 Example Output in GitHub Actions Logs

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


Troubleshooting

🔴 Pipeline doesn't start

  • Ensure pipeline_id is correct.
  • Verify API key is valid.

📄 License

This GitHub Action is open-source under the Apache 2.0 License

About

Trigger a pipeline on Cycle as a Github Action

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •