GitHub Actions
GitHub Actions Integration
You can run Xray Checker using GitHub Actions. This approach is useful when you need to run checks from different locations or don’t have your own server.
Quick Setup
- Fork the xray-checker-in-actions repository
- Configure the following secrets in your forked repository:
SUBSCRIPTION_URL
: Your subscription URLPUSH_URL
: Prometheus pushgateway URL for metrics collectionINSTANCE
: (Optional) Instance name for metrics identification
The Action will:
- Run every 5 minutes
- Use the latest version of Xray Checker
- Push metrics to your Prometheus pushgateway
- Run with
--run-once
flag to ensure clean execution
This method requires a properly configured Prometheus pushgateway as it can’t expose metrics directly. The metrics will be pushed to your specified PUSH_URL
with the instance label from your configuration.
Advanced Configurations
If you need more control over your GitHub Actions setup, here are some advanced configurations you can use.
Multiple Region Setup
Run checks from different regions simultaneously:
Error Notifications
Add Slack or Email notifications for failed checks:
Custom Check Intervals
Different schedule patterns based on your needs:
Resource Optimization
Optimize GitHub Actions usage with concurrency controls:
Monitoring Setup
Required Prometheus Configuration
To collect metrics from the pushgateway, add this to your Prometheus configuration:
The metrics will appear with the instance label you specified in your GitHub Actions configuration, allowing you to track checks from different locations.