GitHub Integration
Overview
This guide will help you seamlessly connect your GitHub projects with Binadox. Whether you’re a developer, project manager, or DevOps professional, this integration will provide valuable data and tools to optimize your software development lifecycle. Follow this step-by-step guide to set up the integration quickly and efficiently.
Once integrated, pricing will be automatically calculated after each push to the repository and added as a comment to the commit. Ensure that your account has the necessary permissions to write comments. If permissions are not granted, comments will appear every 24 hours. While this step is optional, it’s highly recommended for immediate feedback.
Integration Steps
1. Generate a Secret Token in Binadox
Log in to your Binadox account.
Navigate to System Configuration > API. Click the Create API button.
Enter a descriptive name for your API token in the Name field. Click Save.
Copy and securely store the generated API key. You’ll need this in step 3.
2. Create a New Configuration File in GitHub
Log in your GitHub account.
In the root directory of your GitHub project, create a new file named .github/workflows/binadox.yml.
Enter the following code in the file:
on: [push]
jobs:
binadox_job:
runs-on: ubuntu-latest
name: Binadox Structure-As-Code Analyzer
steps:
- name: binadox
uses: binadox-public/binadox-infrastructure-as-code-analyzer@v1.2
with:
binadox-secret-token: '${{ secrets.BINADOX_TOKEN }}'
binadox-server-url: 'https://app.binadox.com/api/1/organizations/pricing/callback/analyze_iaac'
binadox-project-name: 'my project'
- name: Get the status
run: echo "Status ${{ steps.binadox.outputs.status }}"
Click the Commit changes button.
3. Create GitHub Secrets and Variables
Go to your GitHub repository’s Settings.
In the left sidebar menu, select Secrets and variables, then click on Actions.
Click on the New repository secret button.
Create a new secret.
- Name: BINADOX_TOKEN
- Secret: [Your Binadox API key from step 1]
Note:
Always keep your BINADOX_SECRET_TOKEN secure. Never expose it in your code or public repositories.
Click on the Variables section and click New repository variable.
Add the following variables:
- BINADOX_SERVER_URL: https://prod.binadox.com/api/1/organizations/pricing/callback/analyze_iaac
- BINADOX_PROJECT_NAME: Your project name (e.g., “my project”)
Support and Resources
- For further assistance, please contact Binadox support.
- Consult the GitHub Actions documentation for more information on workflow configuration.
- Visit the Help Center for additional details on the Structure-As-Code Analyzer.
By following this guide, you’ve successfully integrated the Binadox Structure-As-Code Analyzer with your GitHub repository, enabling automated code analysis to enhance your development workflow and code quality.
Go Up
~5 minutes read